summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-09-25 20:28:57 +0200
committermathieui <mathieui@mathieui.net>2011-09-25 20:28:57 +0200
commit6037c4be65fd1a85e8500e830e61eef4837a815a (patch)
treea1334d74d364645ce3d8084fbfaf40bd58b9e547 /src
parenta37b5e03a2ff7bdabe2d461643a90790aea4e87c (diff)
downloadpoezio-6037c4be65fd1a85e8500e830e61eef4837a815a.tar.gz
poezio-6037c4be65fd1a85e8500e830e61eef4837a815a.tar.bz2
poezio-6037c4be65fd1a85e8500e830e61eef4837a815a.tar.xz
poezio-6037c4be65fd1a85e8500e830e61eef4837a815a.zip
Fix some more presence leaks
Diffstat (limited to 'src')
-rw-r--r--src/tabs.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tabs.py b/src/tabs.py
index f25006a8..1b0406f2 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -799,7 +799,8 @@ class MucTab(ChatTab):
room.users.append(new_user)
if from_nick == room.own_nick:
room.joined = True
- self.send_chat_state('active')
+ if self.core.current_tab() == self and self.core.status.show not in ('xa', 'away'):
+ self.send_chat_state('active')
new_user.color = get_theme().COLOR_OWN_NICK
room.add_message(_("\x195}Your nickname is \x193}%s") % (from_nick))
if '170' in status_codes:
@@ -1021,7 +1022,8 @@ class PrivateTab(ChatTab):
msg['body'] = xhtml.clean_text(line)
msg['xhtml_im'] = xhtml.poezio_colors_to_html(line)
if config.get('send_chat_states', 'true') == 'true' and self.remote_wants_chatstates is not False:
- msg['chat_state'] = 'active'
+ needed = 'inactive' if self.core.status.show in ('xa', 'away') else 'active'
+ msg['chat_state'] = needed
msg.send()
self.core.add_message_to_text_buffer(self.get_room(), line, None, self.core.own_nick or self.get_room().own_nick)
logger.log_message(JID(self.get_name()).bare, self.core.own_nick, line)
@@ -1557,7 +1559,8 @@ class ConversationTab(ChatTab):
msg['body'] = xhtml.clean_text(line)
msg['xhtml_im'] = xhtml.poezio_colors_to_html(line)
if config.get('send_chat_states', 'true') == 'true' and self.remote_wants_chatstates is not False:
- msg['chat_state'] = 'active'
+ needed = 'inactive' if self.core.status.show in ('xa', 'away') else 'active'
+ msg['chat_state'] = needed
msg.send()
self.core.add_message_to_text_buffer(self.get_room(), line, None, self.core.own_nick)
logger.log_message(JID(self.get_name()).bare, self.core.own_nick, line)