mirror of
https://github.com/mautrix/telegram.git
synced 2026-05-17 07:25:46 +03:00
Fix order of operations when syncing contacts
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
# (unreleased)
|
||||
# v0.11.1 (2021-0?-??, unreleased)
|
||||
|
||||
* Added support for message reactions
|
||||
* Added support for spoiler text.
|
||||
* Fixed syncing contacts throwing an error for new accounts.
|
||||
|
||||
# v0.11.0 (2021-12-28)
|
||||
|
||||
|
||||
@@ -655,10 +655,10 @@ class User(DBUser, AbstractUser, BaseUser):
|
||||
if self.saved_contacts != response.saved_count:
|
||||
self.saved_contacts = response.saved_count
|
||||
await self.save()
|
||||
await self.set_contacts(user.id for user in response.users)
|
||||
for user in response.users:
|
||||
puppet = await pu.Puppet.get_by_tgid(user.id)
|
||||
await puppet.update_info(self, user)
|
||||
await self.set_contacts(user.id for user in response.users)
|
||||
|
||||
# endregion
|
||||
# region Class instance lookup
|
||||
|
||||
Reference in New Issue
Block a user