mirror of
https://github.com/maubot/maubot.git
synced 2024-10-01 01:06:10 -04:00
Support disabling setting displayname/avatar url
This commit is contained in:
parent
cbe312176d
commit
d5541caf8d
@ -200,12 +200,14 @@ class Client:
|
||||
if displayname is None or displayname == self.displayname:
|
||||
return
|
||||
self.db_instance.displayname = displayname
|
||||
if self.displayname != "disable":
|
||||
await self.client.set_displayname(self.displayname)
|
||||
|
||||
async def update_avatar_url(self, avatar_url: ContentURI) -> None:
|
||||
if avatar_url is None or avatar_url == self.avatar_url:
|
||||
return
|
||||
self.db_instance.avatar_url = avatar_url
|
||||
if self.avatar_url != "disable":
|
||||
await self.client.set_avatar_url(self.avatar_url)
|
||||
|
||||
async def update_access_details(self, access_token: str, homeserver: str) -> None:
|
||||
|
Loading…
Reference in New Issue
Block a user