From bf70fb8a050a3fdc5265a58f3b7f2c5ad7364008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Wed, 20 May 2020 00:00:45 +0200 Subject: [PATCH] MucTab: Ignore presence from MUC barejid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- poezio/tabs/muctab.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py index d4ff1d48..dc1a40d4 100644 --- a/poezio/tabs/muctab.py +++ b/poezio/tabs/muctab.py @@ -513,6 +513,9 @@ class MucTab(ChatTab): """ 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( presence) if typ == 'unavailable': @@ -596,6 +599,9 @@ class MucTab(ChatTab): """ 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( presence) change_nick = '303' in status_codes