changeset 2427:07478106a10d

plugin identity: fixed jid.userhostJID call + capitalize user when jid is used.
author Goffi <goffi@goffi.org>
date Sat, 11 Nov 2017 18:35:28 +0100
parents 6c39f30444a0
children c2d88fe05303
files src/plugins/plugin_misc_identity.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/plugin_misc_identity.py	Sat Nov 11 18:34:21 2017 +0100
+++ b/src/plugins/plugin_misc_identity.py	Sat Nov 11 18:35:28 2017 +0100
@@ -66,13 +66,13 @@
         """
         id_data = {}
         # we first check roster
-        roster_item = yield client.roster.getItem(jid_.userhostJID)
+        roster_item = yield client.roster.getItem(jid_.userhostJID())
         if roster_item is not None and roster_item.name:
             id_data[u'nick'] = roster_item.name
         else:
             # then vcard
             nick = yield self._v.getNick(client, jid_)
-            id_data[u'nick'] = nick if nick else jid_.user
+            id_data[u'nick'] = nick if nick else jid_.user.capitalize()
 
         defer.returnValue(id_data)