Mercurial > libervia-backend
changeset 2977:06f30ad8e110
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.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 30 Jun 2019 15:43:57 +0200 |
parents | 49458e12e414 |
children | bad0b4280b77 |
files | sat/core/sat_main.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/sat/core/sat_main.py Sun Jun 30 15:41:59 2019 +0200 +++ b/sat/core/sat_main.py Sun Jun 30 15:43:57 2019 +0200 @@ -503,7 +503,9 @@ 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)