diff options
author | mathieui <mathieui@mathieui.net> | 2015-04-28 17:44:03 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2015-04-28 17:44:03 +0200 |
commit | ae7c506477e6b5c7d7c186193cd62b47e4501b52 (patch) | |
tree | 8a899b2e5923faa8acf872dcbc8dde8067d12760 /src/core | |
parent | 39c01fe3b6c85b6edb1bd416d7448aa8a2010210 (diff) | |
download | poezio-ae7c506477e6b5c7d7c186193cd62b47e4501b52.tar.gz poezio-ae7c506477e6b5c7d7c186193cd62b47e4501b52.tar.bz2 poezio-ae7c506477e6b5c7d7c186193cd62b47e4501b52.tar.xz poezio-ae7c506477e6b5c7d7c186193cd62b47e4501b52.zip |
Display the MUC-related error messages inside the MUC
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/handlers.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/handlers.py b/src/core/handlers.py index 16bc2a7d..720a0977 100644 --- a/src/core/handlers.py +++ b/src/core/handlers.py @@ -239,7 +239,7 @@ def on_error_message(self, message): for tab in self.get_tabs(tabs.MucTab): if tab.name == jid_from.bare: if message['type'] == 'error': - return self.room_error(message, jid_from) + return self.room_error(message, jid_from.bare) else: return self.on_groupchat_private_message(message) tab = self.get_conversation_by_jid(message['from'], create=False) @@ -1137,6 +1137,8 @@ def room_error(self, error, room_name): Display the error in the tab """ tab = self.get_tab_by_name(room_name, tabs.MucTab) + if not tab: + return error_message = self.get_error_message(error) tab.add_message(error_message, highlight=True, nickname='Error', nick_color=get_theme().COLOR_ERROR_MSG, typ=2) |