Improve profile info syncing

This commit is contained in:
Tulir Asokan
2022-02-01 20:51:54 +02:00
parent ecf3a12bd4
commit a55d9ae36a
9 changed files with 234 additions and 105 deletions
+2
View File
@@ -469,9 +469,11 @@ class AbstractUser(ABC):
puppet.username = update.username
if await puppet.update_displayname(self, update):
await puppet.save()
await puppet.update_portals_meta()
elif isinstance(update, UpdateUserPhoto):
if await puppet.update_avatar(self, update.photo):
await puppet.save()
await puppet.update_portals_meta()
else:
self.log.warning(f"Unexpected other user info update: {type(update)}")