From ad40509c899ac4cf257de1fcfe0a356e2523d466 Mon Sep 17 00:00:00 2001 From: Goffi Date: Sun, 30 Jun 2019 15:43:57 +0200 Subject: [PATCH] core: return full jid in bridge's getContacts: getContacts was returning only bare jid of entities, but jids with resources may be present in roster, so this behaviour has been changed. --- sat/core/sat_main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sat/core/sat_main.py b/sat/core/sat_main.py index 6a9ef947..e335e98d 100644 --- a/sat/core/sat_main.py +++ b/sat/core/sat_main.py @@ -503,7 +503,9 @@ class SAT(service.Service): for item in client.roster.getItems(): # we get all items for client's roster # and convert them to expected format attr = client.roster.getAttributes(item) - ret.append([item.jid.userhost(), attr, item.groups]) + # we use full() and not userhost() because jid with resources are allowed + # in roster, even if it's not common. + ret.append([item.entity.full(), attr, item.groups]) return ret return client.roster.got_roster.addCallback(got_roster)