MucTab: Ignore presence from MUC barejid

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2020-05-20 00:00:45 +02:00
parent 36a0281b67
commit bf70fb8a05
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -513,6 +513,9 @@ class MucTab(ChatTab):
""" """
Presence received while we are not in the room (before code=110) Presence received while we are not in the room (before code=110)
""" """
# If presence is coming from MUC barejid, ignore.
if not presence['from'].resource:
return None
from_nick, _, affiliation, show, status, role, jid, typ = dissect_presence( from_nick, _, affiliation, show, status, role, jid, typ = dissect_presence(
presence) presence)
if typ == 'unavailable': if typ == 'unavailable':
@ -596,6 +599,9 @@ class MucTab(ChatTab):
""" """
Handle new presences when we are already in the room Handle new presences when we are already in the room
""" """
# If presence is coming from MUC barejid, ignore.
if not presence['from'].resource:
return None
from_nick, from_room, affiliation, show, status, role, jid, typ = dissect_presence( from_nick, from_room, affiliation, show, status, role, jid, typ = dissect_presence(
presence) presence)
change_nick = '303' in status_codes change_nick = '303' in status_codes