changeset 623:4f7550a083b4 frontends_multi_profiles

server and browser sides: fixes bad call to "subscription" bridge method
author souliane <souliane@mailoo.org>
date Sun, 22 Feb 2015 21:42:14 +0100
parents 2c41ce0c3b3f
children 9092e624bb27
files src/browser/libervia_main.py src/server/server.py
diffstat 2 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/browser/libervia_main.py	Fri Feb 20 22:05:14 2015 +0100
+++ b/src/browser/libervia_main.py	Sun Feb 22 21:42:14 2015 +0100
@@ -815,7 +815,8 @@
             msg = HTML('The contact <b>%s</b> want to add you in his/her contact list, do you accept ?' % html_tools.html_sanitize(entity))
 
             def ok_cb(ignore):
-                self.bridge.call('subscription', None, "subscribed", entity, '', _dialog.getSelectedGroups())
+                self.bridge.call('subscription', None, "subscribed", entity)
+                self.bridge.updateContact(entity, '', _dialog.getSelectedGroups())
 
             def cancel_cb(ignore):
                 self.bridge.call('subscription', None, "unsubscribed", entity, '', '')
--- a/src/server/server.py	Fri Feb 20 22:05:14 2015 +0100
+++ b/src/server/server.py	Sun Feb 22 21:42:14 2015 +0100
@@ -212,13 +212,11 @@
         profile = ISATSession(self.session).profile
         self.sat_host.bridge.updateContact(entity, name, groups, profile)
 
-    def jsonrpc_subscription(self, sub_type, entity, name, groups):
+    def jsonrpc_subscription(self, sub_type, entity):
         """Confirm (or infirm) subscription,
         and setup user roster in case of subscription"""
         profile = ISATSession(self.session).profile
         self.sat_host.bridge.subscription(sub_type, entity, profile)
-        if sub_type == 'subscribed':
-            self.sat_host.bridge.updateContact(entity, name, groups, profile)
 
     def jsonrpc_getWaitingSub(self):
         """Return list of room already joined by user"""