From c7698c5057143e61d43afc7a25e73a211572f71d Mon Sep 17 00:00:00 2001 From: Goffi Date: Wed, 3 Oct 2018 20:37:12 +0200 Subject: [PATCH] plugin identity: fixed nick when there is no user part in entity --- sat/plugins/plugin_misc_identity.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sat/plugins/plugin_misc_identity.py b/sat/plugins/plugin_misc_identity.py index ffbd294f..4860292c 100755 --- a/sat/plugins/plugin_misc_identity.py +++ b/sat/plugins/plugin_misc_identity.py @@ -90,7 +90,12 @@ class Identity(object): 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(