Commit 156cfb55 authored by mathieui's avatar mathieui

Fix #3056 (send inactive chatstate when leaving a tab)

parent 7592aebc
......@@ -324,9 +324,7 @@ class ConversationTab(OneToOneTab):
self.state = 'normal'
self.text_win.remove_line_separator()
self.text_win.add_line_separator(self._text_buffer)
if (config.get_by_tabname('send_chat_states', self.general_jid)
and (not self.input.get_text()
or not self.input.get_text().startswith('//'))):
if config.get_by_tabname('send_chat_states', self.general_jid):
if resource:
self.send_chat_state('inactive')
self.check_scrolled()
......
......@@ -1035,8 +1035,7 @@ class MucTab(ChatTab):
self.state = 'disconnected'
self.text_win.remove_line_separator()
self.text_win.add_line_separator(self._text_buffer)
if (config.get_by_tabname('send_chat_states', self.general_jid) and
not self.input.get_text()):
if config.get_by_tabname('send_chat_states', self.general_jid):
self.send_chat_state('inactive')
self.check_scrolled()
......
......@@ -280,7 +280,7 @@ class PrivateTab(OneToOneTab):
self.text_win.add_line_separator(self._text_buffer)
tab = self.core.get_tab_by_name(safeJID(self.name).bare, MucTab)
if tab and tab.joined and config.get_by_tabname('send_chat_states',
self.general_jid) and not self.input.get_text() and self.on:
self.general_jid) and self.on:
self.send_chat_state('inactive')
self.check_scrolled()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment