aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_vcard_legacy.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/mod_vcard_legacy.lua b/plugins/mod_vcard_legacy.lua
index 89ef1a4f..91497493 100644
--- a/plugins/mod_vcard_legacy.lua
+++ b/plugins/mod_vcard_legacy.lua
@@ -116,6 +116,14 @@ module:hook("iq-get/bare/vcard-temp:vCard", function (event)
:up();
end
end
+ else
+ local ok, _, nick_item = pep_service:get_last_item("http://jabber.org/protocol/nick", stanza.attr.from);
+ if ok and nick_item then
+ local nickname = nick_item:get_child_text("nick", "http://jabber.org/protocol/nick");
+ if nickname then
+ vcard_temp:text_tag("NICKNAME", nickname);
+ end
+ end
end
local meta_ok, avatar_meta = pep_service:get_items("urn:xmpp:avatar:metadata", stanza.attr.from);