summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2017-10-08 21:30:11 +0200
committermathieui <mathieui@mathieui.net>2017-10-08 21:30:11 +0200
commit156cfb55465371ae95ea61cd02cfcfda442cb1f4 (patch)
tree19ccf4a06127bd8dda4a5f9a2849abfd1729609a
parent7592aebcdcf40450c72c538bdc5aff0089a45f45 (diff)
downloadpoezio-156cfb55465371ae95ea61cd02cfcfda442cb1f4.tar.gz
poezio-156cfb55465371ae95ea61cd02cfcfda442cb1f4.tar.bz2
poezio-156cfb55465371ae95ea61cd02cfcfda442cb1f4.tar.xz
poezio-156cfb55465371ae95ea61cd02cfcfda442cb1f4.zip
Fix #3056 (send inactive chatstate when leaving a tab)
-rw-r--r--poezio/tabs/conversationtab.py4
-rw-r--r--poezio/tabs/muctab.py3
-rw-r--r--poezio/tabs/privatetab.py2
3 files changed, 3 insertions, 6 deletions
diff --git a/poezio/tabs/conversationtab.py b/poezio/tabs/conversationtab.py
index 9f7c1391..8c128797 100644
--- a/poezio/tabs/conversationtab.py
+++ b/poezio/tabs/conversationtab.py
@@ -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()
diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py
index a89529be..5382d15a 100644
--- a/poezio/tabs/muctab.py
+++ b/poezio/tabs/muctab.py
@@ -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()
diff --git a/poezio/tabs/privatetab.py b/poezio/tabs/privatetab.py
index 9279929a..ec3ed74a 100644
--- a/poezio/tabs/privatetab.py
+++ b/poezio/tabs/privatetab.py
@@ -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()