From f438a27ab81b9fefbf698210084dea92c5ff17fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Wed, 8 Aug 2018 21:11:00 +0200 Subject: [PATCH] Handle new MUC status code 333 --- gajim/groupchat_control.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gajim/groupchat_control.py b/gajim/groupchat_control.py index 4504b91e6..5489cee72 100644 --- a/gajim/groupchat_control.py +++ b/gajim/groupchat_control.py @@ -1830,7 +1830,14 @@ class GroupchatControl(ChatControlBase): if obj.show in ('offline', 'error'): if obj.status_code: - if '307' in obj.status_code: + if '333' in obj.status_code: + # Handle 333 before 307, some MUCs add both + if obj.nick == self.nick: + s = _('%s kicked us due to an error' % self.room_jid) + else: + s = _('%s has left due to an error' % nick) + self.print_conversation(s, 'info', graphics=False) + elif '307' in obj.status_code: if obj.actor is None: # do not print 'kicked by None' s = _('%(nick)s has been kicked: %(reason)s') % { 'nick': nick, 'reason': obj.reason}