summaryrefslogtreecommitdiff
path: root/src/gui.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-09-26 18:35:22 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-09-26 18:35:22 +0000
commitb7b6889d4e040a8cbdec57d508c59d756a8c3939 (patch)
tree80d657c1b0e02c5e3cf77c5e3d9640163f1d31d5 /src/gui.py
parent390e952829dfbf9bed2cf4647e07ab9249d59cf2 (diff)
downloadpoezio-b7b6889d4e040a8cbdec57d508c59d756a8c3939.tar.gz
poezio-b7b6889d4e040a8cbdec57d508c59d756a8c3939.tar.bz2
poezio-b7b6889d4e040a8cbdec57d508c59d756a8c3939.tar.xz
poezio-b7b6889d4e040a8cbdec57d508c59d756a8c3939.zip
open conversation only if a message has a body. And use the group 'none' for contacts in no groups
Diffstat (limited to 'src/gui.py')
-rw-r--r--src/gui.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui.py b/src/gui.py
index 30624331..059e2465 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -435,11 +435,13 @@ class Gui(object):
debug('MESSAGE: %s\n' % (message))
jid = message['from'].bare
room = self.get_conversation_by_jid(jid)
+ body = message['body']
+ if not body:
+ return
if not room:
room = self.open_conversation_window(jid, False)
if not room:
return
- body = message['body']
self.add_message_to_text_buffer(room, body, None, jid)
self.refresh_window()
return
@@ -456,7 +458,7 @@ class Gui(object):
A subscription changed, or we received a roster item
after a roster request, etc
"""
- # debug('Roster Update: \n%s\n\n' % iq)
+ debug('Roster Update: \n%s\n\n' % iq)
for item in iq.findall('{jabber:iq:roster}query/{jabber:iq:roster}item'):
jid = item.attrib['jid']
contact = self.roster.get_contact_by_jid(jid)