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:
Goffi 2014-03-28 18:07:17 +01:00
commit 382d49a628

View file

@ -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