Mercurial > libervia-backend
comparison 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 |
comparison
equal
deleted
inserted
replaced
2891:6a0f42e9410a | 2892:82b781c46841 |
---|---|
143 self.bridge.register_method("setPresence", self._setPresence) | 143 self.bridge.register_method("setPresence", self._setPresence) |
144 self.bridge.register_method("subscription", self.subscription) | 144 self.bridge.register_method("subscription", self.subscription) |
145 self.bridge.register_method("addContact", self._addContact) | 145 self.bridge.register_method("addContact", self._addContact) |
146 self.bridge.register_method("updateContact", self._updateContact) | 146 self.bridge.register_method("updateContact", self._updateContact) |
147 self.bridge.register_method("delContact", self._delContact) | 147 self.bridge.register_method("delContact", self._delContact) |
148 self.bridge.register_method("rosterResync", self._rosterResync) | |
148 self.bridge.register_method("isConnected", self.isConnected) | 149 self.bridge.register_method("isConnected", self.isConnected) |
149 self.bridge.register_method("launchAction", self.launchCallback) | 150 self.bridge.register_method("launchAction", self.launchCallback) |
150 self.bridge.register_method("actionsGet", self.actionsGet) | 151 self.bridge.register_method("actionsGet", self.actionsGet) |
151 self.bridge.register_method("progressGet", self._progressGet) | 152 self.bridge.register_method("progressGet", self._progressGet) |
152 self.bridge.register_method("progressGetAll", self._progressGetAll) | 153 self.bridge.register_method("progressGetAll", self._progressGetAll) |
807 profile = self.memory.getProfileName(profile_key) | 808 profile = self.memory.getProfileName(profile_key) |
808 assert profile | 809 assert profile |
809 self.profiles[profile].presence.unsubscribe(to_jid) # is not asynchronous | 810 self.profiles[profile].presence.unsubscribe(to_jid) # is not asynchronous |
810 return self.profiles[profile].roster.removeItem(to_jid) | 811 return self.profiles[profile].roster.removeItem(to_jid) |
811 | 812 |
813 def _rosterResync(self, profile_key): | |
814 client = self.getClient(profile_key) | |
815 return client.roster.resync() | |
816 | |
812 ## Discovery ## | 817 ## Discovery ## |
813 # discovery methods are shortcuts to self.memory.disco | 818 # discovery methods are shortcuts to self.memory.disco |
814 # the main difference with client.disco is that self.memory.disco manage cache | 819 # the main difference with client.disco is that self.memory.disco manage cache |
815 | 820 |
816 def hasFeature(self, *args, **kwargs): | 821 def hasFeature(self, *args, **kwargs): |