diff options
author | mathieui <mathieui@mathieui.net> | 2017-10-10 23:29:17 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2017-10-10 23:29:17 +0200 |
commit | f61d46b06123a8a23d2a4fd8ce291caf9b2a58eb (patch) | |
tree | 332b37e18beaedbcb3f1764f744d95b62b4594fd | |
parent | fb68132e8a5fde6296cec947bfb084802ce3155f (diff) | |
download | poezio-f61d46b06123a8a23d2a4fd8ce291caf9b2a58eb.tar.gz poezio-f61d46b06123a8a23d2a4fd8ce291caf9b2a58eb.tar.bz2 poezio-f61d46b06123a8a23d2a4fd8ce291caf9b2a58eb.tar.xz poezio-f61d46b06123a8a23d2a4fd8ce291caf9b2a58eb.zip |
Avoid an exception when we receive a presence from unknown nicks
add a log because it should not happen
-rw-r--r-- | poezio/tabs/muctab.py | 5 |
1 files 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, |