Philipp Hörist pushed to branch master at gajim / gajim
Commits:
918e5ede by Philipp Hörist at 2025-10-19T22:32:28+02:00
new: Store avatar sha in occupant table if available
- - - - -
1 changed file:
- gajim/common/modules/message_util.py
Changes:
=====================================
gajim/common/modules/message_util.py
=====================================
@@ -108,7 +108,7 @@ def get_occupant_info(
resource = properties.jid.resource
assert resource is not None
- return mod.Occupant(
+ occupant = mod.Occupant(
account_=account,
remote_jid_=remote_jid.new_as_bare(),
id=str(occupant_id),
@@ -117,6 +117,13 @@ def get_occupant_info(
updated_at=timestamp,
)
+ if contact.avatar_sha is not None:
+ # avatar_sha is only available if we have presence from this contact
+ # We don’t want to overwrite the previous avatar
+ occupant.avatar_sha = contact.avatar_sha
+
+ return occupant
+
def get_occupant_id(
contact: GroupchatParticipant, properties: MessageProperties
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/918e5edee7b669f3c99f65d22865148f35b21489
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/918e5edee7b669f3c99f65d22865148f35b21489
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]