From 688891fc28f8ce88dde1436239a4073acaddb49a Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 11 May 2006 23:12:01 -0400 Subject: [PATCH] More fixes --- chat/chat.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/chat/chat.py b/chat/chat.py index b5786e48..13917652 100755 --- a/chat/chat.py +++ b/chat/chat.py @@ -196,8 +196,8 @@ class BuddyChat(Chat): def send_message(self, text): if len(text) > 0: - success = self._stream_writer.write(text) - self._local_message(success, text) + self._stream_writer.write(text) + self._local_message(True, text) def activity_on_close_from_user(self): Chat.activity_on_close_from_user(self) @@ -365,10 +365,12 @@ class GroupChat(Chat): self._controller.notify_new_message(self, None) def _buddy_recv_message(self, sender, msg): - if self._chats.has_key(sender): + if not self._chats.has_key(sender): chat = BuddyChat(self, sender) - self._chats[buddy] = chat + self._chats[sender] = chat chat.activity_connect_to_shell() + else: + chat = self._chats[sender] chat.recv_message(sender, msg) class ChatShell(dbus.service.Object):