Yann Leboulanger pushed to branch chat_markers at gajim / gajim
Commits:
b22005a8 by Yann Leboulanger at 2019-09-01T16:23:52Z
fix error
- - - - -
1 changed file:
- gajim/chat_control_base.py
Changes:
=====================================
gajim/chat_control_base.py
=====================================
@@ -1249,6 +1249,7 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
# we are at the end
if not app.events.remove_events(
self.account, jid, types=types_list):
+ con = app.connections[self.account]
# There were events to remove
self.redraw_after_event_removed(jid)
# XEP-0333 Send <displayed> tag.
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/b22005a86aabbc404f2670fc90997c5822…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/b22005a86aabbc404f2670fc90997c5822…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
31a90949 by Philipp Hörist at 2019-09-01T12:32:50Z
MUC: Set state to NOT_JOINED on password request
- - - - -
5c04e715 by Philipp Hörist at 2019-09-01T12:52:55Z
Groupchat: Make sure we leave the MUC on control shutdown
- - - - -
2 changed files:
- gajim/common/modules/muc.py
- gajim/groupchat_control.py
Changes:
=====================================
gajim/common/modules/muc.py
=====================================
@@ -366,6 +366,7 @@ class MUC(BaseModule):
muc_data.jid, muc_data.nick)
self._join(muc_data)
elif properties.error.condition == 'not-authorized':
+ self._set_muc_state(room_jid, MUCJoinedState.NOT_JOINED)
self._raise_muc_event('muc-password-required', properties)
else:
self._set_muc_state(room_jid, MUCJoinedState.NOT_JOINED)
=====================================
gajim/groupchat_control.py
=====================================
@@ -1594,10 +1594,8 @@ class GroupchatControl(ChatControlBase):
self.update_actions()
def leave(self, reason=None):
- app.connections[self.account].get_module('MUC').leave(self.room_jid,
- reason=reason)
self.got_disconnected()
- self._close_control()
+ self._close_control(reason=reason)
def rejoin(self):
if not self.autorejoin:
@@ -2187,7 +2185,16 @@ class GroupchatControl(ChatControlBase):
del win._controls[self.account][self.contact.jid]
- def shutdown(self, status='offline'):
+ def shutdown(self, reason=None):
+ # Preventing autorejoin from being activated
+ self.autorejoin = False
+
+ # Leave MUC if we are still joined
+ if self._muc_data.state != MUCJoinedState.NOT_JOINED:
+ self.got_disconnected()
+ app.connections[self.account].get_module('MUC').leave(
+ self.room_jid, reason=reason)
+
# PluginSystem: calling shutdown of super class (ChatControlBase)
# to let it remove it's GUI extension points
super(GroupchatControl, self).shutdown()
@@ -2196,9 +2203,6 @@ class GroupchatControl(ChatControlBase):
app.plugin_manager.remove_gui_extension_point('groupchat_control',
self)
- # Preventing autorejoin from being activated
- self.autorejoin = False
-
# Unregister handlers
for handler in self._event_handlers:
app.ged.remove_event_handler(*handler)
@@ -2282,11 +2286,11 @@ class GroupchatControl(ChatControlBase):
on_yes(self)
- def _close_control(self):
+ def _close_control(self, reason=None):
if self.parent_win is None:
- self.shutdown()
+ self.shutdown(reason)
else:
- self.parent_win.remove_tab(self, None, force=True)
+ self.parent_win.remove_tab(self, None, reason=reason, force=True)
def set_control_active(self, state):
self.conv_textview.allow_focus_out_line = True
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/2143849981a79c65d0f8629820d900507…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/2143849981a79c65d0f8629820d900507…
You're receiving this email because of your account on dev.gajim.org.