summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui.py6
-rw-r--r--src/roster.py4
2 files changed, 8 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)
diff --git a/src/roster.py b/src/roster.py
index e6be9208..02c88636 100644
--- a/src/roster.py
+++ b/src/roster.py
@@ -22,6 +22,8 @@ class Roster(object):
def __init__(self):
self._contacts = {} # key = jid; value = Contact()
self._roster_groups = []
+ new_group = RosterGroup("none")
+ self._roster_groups.append(new_group)
def add_contact(self, contact, jid):
"""
@@ -44,6 +46,8 @@ class Roster(object):
Add or remove RosterGroup if needed
"""
# add the contact to each group he is in
+ if not len(groups):
+ groups = ['none']
for group in groups:
if group in contact._groups:
continue