changeset 751:2ddd85551612

server + browser side: getFeatures bridge call
author Goffi <goffi@goffi.org>
date Mon, 23 Nov 2015 23:30:34 +0100 (2015-11-23)
parents 8ac862f6e5b3
children 9b57d117e8c5
files src/browser/sat_browser/json.py src/server/server.py
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/browser/sat_browser/json.py	Mon Jul 20 10:16:10 2015 +0200
+++ b/src/browser/sat_browser/json.py	Mon Nov 23 23:30:34 2015 +0100
@@ -181,7 +181,7 @@
                          "getEntityData", "getParamsUI", "asyncGetParamA", "setParam", "launchAction",
                          "disconnect", "chatStateComposing", "getNewAccountDomain", "confirmationAnswer",
                          "syntaxConvert", "getAccountDialogUI", "getMainResource", "getWaitingConf", "getEntitiesData",
-                         "getVersion", "getLiberviaVersion", "getDefaultMUC",
+                         "getVersion", "getLiberviaVersion", "getDefaultMUC", "getFeatures",
                         ])
 
     def __call__(self, *args, **kwargs):
--- a/src/server/server.py	Mon Jul 20 10:16:10 2015 +0200
+++ b/src/server/server.py	Mon Nov 23 23:30:34 2015 +0100
@@ -682,7 +682,11 @@
         profile = ISATSession(self.session).profile
         return self.sat_host.bridge.getLastResource(jid_s, profile)
 
-    # FIXME: as this belong to a plugin, it should be managed dynamically
+    def jsonrpc_getFeatures(self):
+        """Return the available features in the backend for profile"""
+        profile = ISATSession(self.session).profile
+        return self.sat_host.bridge.getFeatures(profile)
+
     def jsonrpc_skipOTR(self):
         """Tell the backend to leave OTR handling to Libervia."""
         profile = ISATSession(self.session).profile