# HG changeset patch # User Goffi # Date 1538591832 -7200 # Node ID 466c9690c43a23e4a015ef562ac20663df01e569 # Parent 263a00e901743713c0d63d190324b8254529affb plugin identity: fixed nick when there is no user part in entity diff -r 263a00e90174 -r 466c9690c43a sat/plugins/plugin_misc_identity.py --- 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(