Mercurial > libervia-backend
changeset 2682:466c9690c43a
plugin identity: fixed nick when there is no user part in entity
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 03 Oct 2018 20:37:12 +0200 |
parents | 263a00e90174 |
children | 38af118a7d74 |
files | sat/plugins/plugin_misc_identity.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/sat/plugins/plugin_misc_identity.py Thu Sep 27 08:51:01 2018 +0200 +++ b/sat/plugins/plugin_misc_identity.py Wed Oct 03 20:37:12 2018 +0200 @@ -90,7 +90,12 @@ else: # and finally then vcard nick = yield self._v.getNick(client, jid_) - id_data[u"nick"] = nick if nick else jid_.user.capitalize() + if nick: + id_data[u"nick"] = nick + elif jid_.user: + id_data[u"nick"] = jid_.user.capitalize() + else: + id_data[u"nick"] = jid_.userhost() try: avatar_path = id_data[u"avatar"] = yield self._v.getAvatar(