core (memory): entities cache improvments:
- entities cache is no more limited to bare jid
- resources are now automatically updated in bare jid cache
This commit is contained in:
parent
2dcca42c19
commit
382d49a628
2 changed files with 118 additions and 70 deletions
|
|
@ -161,8 +161,8 @@ class DBusBridgeFrontend(BridgeFrontend):
|
|||
def getParamsUI(self, security_limit=-1, app='', profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return unicode(self.db_core_iface.getParamsUI(security_limit, app, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:])))
|
||||
|
||||
def getPresenceStatus(self, profile_key="@DEFAULT@"):
|
||||
return self.db_core_iface.getPresenceStatus(profile_key)
|
||||
def getPresenceStatuses(self, profile_key="@DEFAULT@"):
|
||||
return self.db_core_iface.getPresenceStatuses(profile_key)
|
||||
|
||||
def getProfileName(self, profile_key="@DEFAULT@"):
|
||||
return unicode(self.db_core_iface.getProfileName(profile_key))
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ class QuickApp(object):
|
|||
for contact in self.bridge.getContacts(profile):
|
||||
self.newContact(*contact, profile=profile)
|
||||
|
||||
presences = self.bridge.getPresenceStatus(profile)
|
||||
presences = self.bridge.getPresenceStatuses(profile)
|
||||
for contact in presences:
|
||||
for res in presences[contact]:
|
||||
jabber_id = contact + ('/' + res if res else '')
|
||||
|
|
@ -560,7 +560,7 @@ class QuickApp(object):
|
|||
self.showDialog(_("The contact %s has refused your subscription") % entity.bare, _('Subscription refusal'), 'error')
|
||||
elif type == "subscribe":
|
||||
# this is a subscriptionn request, we have to ask for user confirmation
|
||||
answer = self.showDialog(_("The contact %s wants to subscribe to your presence.\nDo you accept ?") % entity.bare, _('Subscription confirmation'), 'yes/no', answer_cb=self._subscribe_cb, answer_data=(entity, profile))
|
||||
self.showDialog(_("The contact %s wants to subscribe to your presence.\nDo you accept ?") % entity.bare, _('Subscription confirmation'), 'yes/no', answer_cb=self._subscribe_cb, answer_data=(entity, profile))
|
||||
|
||||
def showDialog(self, message, title, type="info", answer_cb=None):
|
||||
raise NotImplementedError
|
||||
|
|
|
|||
Loading…
Reference in a new issue