From f61d46b06123a8a23d2a4fd8ce291caf9b2a58eb Mon Sep 17 00:00:00 2001 From: mathieui Date: Tue, 10 Oct 2017 23:29:17 +0200 Subject: Avoid an exception when we receive a presence from unknown nicks add a log because it should not happen --- poezio/tabs/muctab.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py index f95a5fe3..82c9fd0f 100644 --- a/poezio/tabs/muctab.py +++ b/poezio/tabs/muctab.py @@ -1212,7 +1212,9 @@ class MucTab(ChatTab): self.core.events.trigger('muc_join', presence, self) self.on_user_join(from_nick, affiliation, show, status, role, jid, user_color) - # nick change + elif user is None: + log.error('BUG: User %s in %s is None', from_nick, self.name) + return elif change_nick: self.core.events.trigger('muc_nickchange', presence, self) self.on_user_nick_change(presence, user, from_nick, from_room) @@ -1221,7 +1223,6 @@ class MucTab(ChatTab): self.core.on_user_left_private_conversation(from_room, user, status) self.on_user_banned(presence, user, from_nick) - # kick elif kick: self.core.events.trigger('muc_kick', presence, self) self.core.on_user_left_private_conversation(from_room, -- cgit v1.2.3