diff --git a/services/presence/presenceservice.py b/services/presence/presenceservice.py index 6c17082e..5bcfd45d 100644 --- a/services/presence/presenceservice.py +++ b/services/presence/presenceservice.py @@ -350,6 +350,11 @@ class PresenceService(ExportedGObject): byte_arrays=True) def GetBuddyByPublicKey(self, key): buddy = self._buddies_by_pubkey.get(key) + if buddy is not None: + if buddy.props.valid: + return buddy.object_path() + keyid = pubkey_to_keyid(key) + buddy = self._buddies.get('keyid/' + keyid) if buddy is not None: if buddy.props.valid: return buddy.object_path()