diff frontends/quick_frontend/quick_chat.py @ 67:0e50dd3a234a

message sending bug fixes + sortilege update - sortilege now use default profile. /!\ sortilege is really buggy currently, need some attention
author Goffi <goffi@goffi.org>
date Thu, 04 Feb 2010 01:06:36 +1100
parents a5b5fb5fc9fd
children 8f2ed279784b
line wrap: on
line diff
--- a/frontends/quick_frontend/quick_chat.py	Wed Feb 03 23:35:57 2010 +1100
+++ b/frontends/quick_frontend/quick_chat.py	Thu Feb 04 01:06:36 2010 +1100
@@ -30,18 +30,18 @@
         self.to_jid = to_jid
         self.host = host
 
-    def historyPrint(self, size=20, keep_last=False):
+    def historyPrint(self, size=20, keep_last=False, profile='@NONE@'):
         """Print the initial history"""
         debug ("now we print history")
-        history=self.host.bridge.getHistory(self.host.whoami.short, self.to_jid, 20)
+        history=self.host.bridge.getHistory(self.host.profiles[profile]['whoami'].short, self.to_jid, 20)
         stamps=history.keys()
         stamps.sort()
         for stamp in stamps: 
-            self.printMessage(JID(history[stamp][0]), history[stamp][1], stamp)
+            self.printMessage(JID(history[stamp][0]), history[stamp][1], profile, stamp)
         if keep_last:  ##FIXME hack for sortilege
             self.last_history = stamps[-1] if stamps else None
 
-    def printMessage(self, from_jid, msg, timestamp):
+    def printMessage(self, from_jid, msg, profile, timestamp):
         """Print message in chat window. Must be implemented by child class"""
         raise NotImplementedError