Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
4ffabfc9 by wurstsalat at 2025-09-04T20:11:01+02:00
fix: Group chats: Fix resetting settings to default
When using get_contact() on JIDs from the database, we might get a (new)
BareContact back if we haven't seen this JID in our current session.
This can be the case for group chats we've left in previous sessions.
Call get_contact() with groupchat=True to make sure that we always get a
GroupchatContact.
Fixes #11377
- - - - -
1 changed file:
- gajim/common/settings.py
Changes:
=====================================
gajim/common/settings.py
=====================================
@@ -851,7 +851,7 @@ def set_group_chat_setting(self,
context = 'public'
if app.account_is_connected(account):
client = app.get_client(account)
- contact = client.get_module('Contacts').get_contact(jid)
+ contact = client.get_module('Contacts').get_contact(jid,
groupchat=True)
context = contact.muc_context
if context is None:
# If there is no disco info available
@@ -911,7 +911,9 @@ def set_group_chat_settings(self,
for jid in acc_settings['group_chat']:
if context is not None:
client = app.get_client(account)
- contact = client.get_module('Contacts').get_contact(jid)
+ contact = client.get_module('Contacts').get_contact(
+ jid, groupchat=True
+ )
if contact.muc_context != context:
continue
self.set_group_chat_setting(account, jid, setting, value)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/4ffabfc951a666461742d019860addc2a6b5e718
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/4ffabfc951a666461742d019860addc2a6b5e718
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]