summaryrefslogtreecommitdiff
path: root/src/tabs.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-05-29 16:40:41 +0200
committermathieui <mathieui@mathieui.net>2011-05-29 16:40:41 +0200
commitaa0c054f9f7939c25d8c69ab61d0fda1a6d64005 (patch)
tree87986f0cb0ecdd84075efa97219339a7c2d4ec81 /src/tabs.py
parentc44e182a00f8aa79c66d6bc9472ed00b33a0dc16 (diff)
downloadpoezio-aa0c054f9f7939c25d8c69ab61d0fda1a6d64005.tar.gz
poezio-aa0c054f9f7939c25d8c69ab61d0fda1a6d64005.tar.bz2
poezio-aa0c054f9f7939c25d8c69ab61d0fda1a6d64005.tar.xz
poezio-aa0c054f9f7939c25d8c69ab61d0fda1a6d64005.zip
don’t leak presences with chat states when xa or away
Diffstat (limited to 'src/tabs.py')
-rw-r--r--src/tabs.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 3d49b77d..2a409b1a 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -295,6 +295,8 @@ class ChatTab(Tab):
Send an empty chatstate message
"""
if not isinstance(self, MucTab) or self.get_room().joined:
+ if state in ('active', 'inactive', 'gone') and self.core.status.show in ('xa', 'away'):
+ return
msg = self.core.xmpp.make_message(self.get_name())
msg['type'] = self.message_type
msg['chat_state'] = state