mirror of
https://github.com/maubot/maubot
synced 2025-08-28 20:30:38 +00:00
Catch errors when updating profile from server
This commit is contained in:
parent
ff19278d24
commit
93e0ebd24e
1 changed files with 8 additions and 2 deletions
|
@ -504,8 +504,14 @@ class Client(DBClient):
|
||||||
self.start_sync()
|
self.start_sync()
|
||||||
|
|
||||||
async def _update_remote_profile(self) -> None:
|
async def _update_remote_profile(self) -> None:
|
||||||
profile = await self.client.get_profile(self.id)
|
try:
|
||||||
self.remote_displayname, self.remote_avatar_url = profile.displayname, profile.avatar_url
|
profile = await self.client.get_profile(self.id)
|
||||||
|
self.remote_displayname, self.remote_avatar_url = (
|
||||||
|
profile.displayname,
|
||||||
|
profile.avatar_url,
|
||||||
|
)
|
||||||
|
except Exception:
|
||||||
|
self.log.warning("Failed to update own profile from server", exc_info=True)
|
||||||
|
|
||||||
async def delete(self) -> None:
|
async def delete(self) -> None:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue