Philipp Hörist pushed to branch master at gajim / gajim
Commits:
bb6f389b by Philipp Hörist at 2026-03-14T16:02:41+01:00
fix: GroupChat: Fix problem with duplicated messages
In some edge cases Gajim would send a second presence after the join presence.
Ejabberd reacts strange to this and sends MUC history, which leads to
duplicated messages.
- - - - -
1 changed file:
- gajim/common/modules/muc.py
Changes:
=====================================
gajim/common/modules/muc.py
=====================================
@@ -538,8 +538,12 @@ def get_affiliations(
room_jid, include_outcast=include_outcast)
def update_presence(self) -> None:
- mucs = self._get_mucs_with_state([MUCJoinedState.JOINED,
- MUCJoinedState.JOINING])
+ # Only update joined MUCs, ejabberd seems to have a bug
+ # that when we send a presence after the initial join presence
+ # it will overwrite our join presence with it.
+ # This can lead to receiving MUC history because only the join
+ # presence has <history maxchars="0" />
+ mucs = self._get_mucs_with_state([MUCJoinedState.JOINED])
status, message, idle = self._con.get_presence_state()
for muc_data in mucs:
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/bb6f389b4163044aa9a3ba5e52572477d13f4ce0
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/bb6f389b4163044aa9a3ba5e52572477d13f4ce0
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]