Mercurial > libervia-backend
diff sat/plugins/plugin_misc_identity.py @ 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 | 56f94936df1e |
children | 003b8b4b56a7 |
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(