Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/chat/GroupChat.py
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2006-06-18 07:00:23 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2006-06-18 07:00:23 (GMT)
commit51ea9eedba1891abdc004433bfe29a4ae3cc50b1 (patch)
treef969b23b049a3188a52a10c8f2dc9ee0f8938116 /sugar/chat/GroupChat.py
parentbc43e25e107f8737342db295d165ba30b0b2c46d (diff)
Get chat back to work. Well except it get very confused
if users have the same ip address. Dan I commented out the service deserialization in BrowserShell because it was not really working (also there was a few typos in that code)
Diffstat (limited to 'sugar/chat/GroupChat.py')
-rw-r--r--sugar/chat/GroupChat.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/sugar/chat/GroupChat.py b/sugar/chat/GroupChat.py
index c77525a..f143226 100644
--- a/sugar/chat/GroupChat.py
+++ b/sugar/chat/GroupChat.py
@@ -37,5 +37,10 @@ class GroupChat(Chat):
self._group_stream.set_data_listener(self._group_recv_message)
self._stream_writer = self._group_stream.new_writer()
- def _group_recv_message(self, buddy, msg):
- self.recv_message(buddy, msg)
+ def _group_recv_message(self, address, msg):
+ pservice = PresenceService.get_instance()
+ buddy = pservice.get_buddy_by_address(address)
+ if buddy:
+ self.recv_message(buddy, msg)
+ else:
+ logging.error('Cannot map %s to a buddy.' % (address))