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)
This commit is contained in:
Goffi 2010-03-21 10:28:55 +11:00
commit 724a97b14d

View file

@ -26,14 +26,21 @@ from tools.jid import JID
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: