Эх сурвалжийг харах

Try to use contact avatars if contact names are allowed

Tulir Asokan 4 жил өмнө
parent
commit
996b0139b5

+ 1 - 0
mausignald/types.py

@@ -291,6 +291,7 @@ class ReceiptType(SerializableEnum):
     UNKNOWN = "UNKNOWN"
     DELIVERY = "DELIVERY"
     READ = "READ"
+    VIEWED = "VIEWED"
 
 
 @dataclass

+ 2 - 0
mautrix_signal/puppet.py

@@ -180,6 +180,8 @@ class Puppet(DBPuppet, BasePuppet):
                 update = await self._update_name(name) or update
             if isinstance(info, Profile):
                 update = await self._update_avatar(info.avatar) or update
+            elif contact_names != "disallow" and self.number:
+                update = await self._update_avatar(f"contact-{self.number}") or update
             if update:
                 await self.update()
                 asyncio.create_task(self._update_portal_meta())