Mercurial > libervia-backend
diff sat/core/sat_main.py @ 2892:82b781c46841
core: added a rosterResync method to bridge:
rosterResync do a full resynchronisation of roster with server. This should not be needed, but may be useful if user suspect a sync issue for whatever reason.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 07 Apr 2019 18:49:41 +0200 |
parents | b06cb71079fa |
children | 25f14fbd364e |
line wrap: on
line diff
--- a/sat/core/sat_main.py Sun Apr 07 18:47:17 2019 +0200 +++ b/sat/core/sat_main.py Sun Apr 07 18:49:41 2019 +0200 @@ -145,6 +145,7 @@ self.bridge.register_method("addContact", self._addContact) self.bridge.register_method("updateContact", self._updateContact) self.bridge.register_method("delContact", self._delContact) + self.bridge.register_method("rosterResync", self._rosterResync) self.bridge.register_method("isConnected", self.isConnected) self.bridge.register_method("launchAction", self.launchCallback) self.bridge.register_method("actionsGet", self.actionsGet) @@ -809,6 +810,10 @@ self.profiles[profile].presence.unsubscribe(to_jid) # is not asynchronous return self.profiles[profile].roster.removeItem(to_jid) + def _rosterResync(self, profile_key): + client = self.getClient(profile_key) + return client.roster.resync() + ## Discovery ## # discovery methods are shortcuts to self.memory.disco # the main difference with client.disco is that self.memory.disco manage cache