diff frontends/quick_frontend/quick_chat.py @ 72:f271fff3a713

MUC implementation: first draft /!\ the experimental muc branche of wokkel must be used - bridge: new roomJoined signal - wix: contact list widget is now in a separate file, and manage different kinds of presentation - wix: chat window now manage group chat (first draft, not working yet) - wix: constants are now in a separate class, so then can be accessible from everywhere - wix: new menu to join room (do nothing yet, except entering in a test room) - new plugin for xep 0045 (MUC), use wokkel experimental MUC branch - plugins: the profile is now given for get_handler, cause it can be used internally by a plugin (e.g.: xep-0045 plugin)
author Goffi <goffi@goffi.org>
date Sun, 21 Mar 2010 10:28:55 +1100
parents 8f2ed279784b
children db0a0f000e37
line wrap: on
line diff
--- a/frontends/quick_frontend/quick_chat.py	Sat Mar 06 14:57:23 2010 +1100
+++ b/frontends/quick_frontend/quick_chat.py	Sun Mar 21 10:28:55 2010 +1100
@@ -26,14 +26,21 @@
 
 class QuickChat():
     
-    def __init__(self, to_jid, host):
-        self.to_jid = to_jid
+    def __init__(self, target, host, type='one2one'):
+        self.target = target
         self.host = host
+        self.type = type
+
+    def setType(self, type):
+        """Set the type of the chat
+        @param type: can be 'one2one' for single conversation or 'group' for chat à la IRC
+        """
+        self.type = type
 
     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.profiles[profile]['whoami'].short, self.to_jid, 20)
+        history=self.host.bridge.getHistory(self.host.profiles[profile]['whoami'].short, self.target, 20)
         stamps=history.keys()
         stamps.sort()
         for stamp in stamps: