summaryrefslogtreecommitdiff
path: root/src/core.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-11-09 22:34:16 +0100
committermathieui <mathieui@mathieui.net>2011-11-09 22:34:16 +0100
commitf55a0c92f21e8b0c5cbd1e0413f2c2a95b29a8ae (patch)
tree474abb583d0de139c255d3adc309852a1783cafc /src/core.py
parent7f322e7d8885c33540b33b2147a02333a252673d (diff)
downloadpoezio-f55a0c92f21e8b0c5cbd1e0413f2c2a95b29a8ae.tar.gz
poezio-f55a0c92f21e8b0c5cbd1e0413f2c2a95b29a8ae.tar.bz2
poezio-f55a0c92f21e8b0c5cbd1e0413f2c2a95b29a8ae.tar.xz
poezio-f55a0c92f21e8b0c5cbd1e0413f2c2a95b29a8ae.zip
Do not send chatstates when the contact is offline
Diffstat (limited to 'src/core.py')
-rw-r--r--src/core.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core.py b/src/core.py
index 9109cff6..e6b1239b 100644
--- a/src/core.py
+++ b/src/core.py
@@ -626,7 +626,7 @@ class Core(object):
self.events.trigger('conversation_msg', message, conversation)
body = xhtml.get_body_from_message_stanza(message)
if roster.get_contact_by_jid(jid.bare):
- remote_nick = roster.get_contact_by_jid(jid.bare).get_name() or jid.user
+ remote_nick = roster.get_contact_by_jid(jid.bare).name or jid.user
else:
remote_nick = jid.user
conversation._text_buffer.add_message(body, nickname=remote_nick, nick_color=get_theme().COLOR_REMOTE_USER)
@@ -1590,10 +1590,10 @@ class Core(object):
when enter is pressed on the roster window
"""
if isinstance(roster_row, Contact):
- if not self.get_conversation_by_jid(roster_row.get_bare_jid()):
- self.open_conversation_window(roster_row.get_bare_jid())
+ if not self.get_conversation_by_jid(roster_row.bare_jid):
+ self.open_conversation_window(roster_row.bare_jid)
else:
- self.focus_tab_named(roster_row.get_bare_jid())
+ self.focus_tab_named(roster_row.bare_jid)
if isinstance(roster_row, Resource):
if not self.get_conversation_by_jid(roster_row.get_jid().full):
self.open_conversation_window(roster_row.get_jid().full)