changeset 520:d58d4dd0cefe

browser and server sides: add bridge method getLastResource
author souliane <souliane@mailoo.org>
date Tue, 02 Sep 2014 21:21:21 +0200
parents 138336986bd0
children 69bffcf37ce3
files src/browser/libervia_main.py src/server/server.py
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/browser/libervia_main.py	Tue Sep 02 21:18:10 2014 +0200
+++ b/src/browser/libervia_main.py	Tue Sep 02 21:21:21 2014 +0200
@@ -134,7 +134,7 @@
                          "getWaitingSub", "subscription", "delContact", "updateContact", "getCard",
                          "getEntityData", "getParamsUI", "asyncGetParamA", "setParam", "launchAction",
                          "disconnect", "chatStateComposing", "getNewAccountDomain", "confirmationAnswer",
-                         "syntaxConvert", "getAccountDialogUI",
+                         "syntaxConvert", "getAccountDialogUI", "getLastResource"
                         ])
 
 
--- a/src/server/server.py	Tue Sep 02 21:18:10 2014 +0200
+++ b/src/server/server.py	Tue Sep 02 21:21:21 2014 +0200
@@ -552,6 +552,11 @@
         profile = ISATSession(self.session).profile
         return self.sat_host.bridge.syntaxConvert(text, syntax_from, syntax_to, True, profile)
 
+    def jsonrpc_getLastResource(self, jid_s):
+        """Tell the backend to leave us OTR handling"""
+        profile = ISATSession(self.session).profile
+        return self.sat_host.bridge.getLastResource(jid_s, profile)
+
 
 class Register(JSONRPCMethodManager):
     """This class manage the registration procedure with SàT