Mercurial > libervia-web
diff libervia.tac @ 251:24335e82fef0
plugin XEP-249: added parameter Misc / Auto-join MUC on invitation:
- also cleaned getOrCreateLiberviaWidget and _chatStateReceivedCb from unused arguments
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 05 Nov 2013 21:12:14 +0100 |
parents | a25aa882e09a |
children | 53c7f0237f1e |
line wrap: on
line diff
--- a/libervia.tac Wed Oct 23 18:33:16 2013 +0200 +++ b/libervia.tac Tue Nov 05 21:12:14 2013 +0100 @@ -440,6 +440,12 @@ d = self.asyncBridgeCall("getNewAccountDomain") return d + def jsonrpc_confirmationAnswer(self, confirmation_id, result, answer_data): + """Send the user's answer to any previous 'askConfirmation' signal""" + profile = ISATSession(self.session).profile + self.sat_host.bridge.confirmationAnswer(confirmation_id, result, answer_data, profile) + + class Register(JSONRPCMethodManager): """This class manage the registration procedure with SàT It provide an api for the browser, check password and setup the web server""" @@ -653,7 +659,8 @@ _session = self.request.getSession() profile = ISATSession(_session).profile return bool(profile) - + + class SignalHandler(jsonrpc.JSONRPC): def __init__(self, sat_host): @@ -843,7 +850,7 @@ self.bridge.register("connectionError", self.signal_handler.connectionError) self.bridge.register("actionResult", self.action_handler.actionResultCb) #core - for signal_name in ['presenceUpdate', 'newMessage', 'subscribe', 'contactDeleted', 'newContact', 'entityDataUpdated']: + for signal_name in ['presenceUpdate', 'newMessage', 'subscribe', 'contactDeleted', 'newContact', 'entityDataUpdated', 'askConfirmation', 'newAlert']: self.bridge.register(signal_name, self.signal_handler.getGenericCb(signal_name)) #plugins for signal_name in ['personalEvent', 'roomJoined', 'roomUserJoined', 'roomUserLeft', 'tarotGameStarted', 'tarotGameNew', 'tarotGameChooseContrat',