From 3afb5ef61a63ac44da1c2e5a5f710b3594910c82 Mon Sep 17 00:00:00 2001
From: Kim Alvefur <zash@zash.se>
Date: Sat, 1 Sep 2018 22:06:25 +0200
Subject: mod_vcard_legacy: Announce feature on bare JID per XEP

---
 plugins/mod_vcard_legacy.lua | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'plugins')

diff --git a/plugins/mod_vcard_legacy.lua b/plugins/mod_vcard_legacy.lua
index 51d84dc3..e348b84f 100644
--- a/plugins/mod_vcard_legacy.lua
+++ b/plugins/mod_vcard_legacy.lua
@@ -9,7 +9,9 @@ local base64_decode = require "util.encodings".base64.decode;
 local vcards = module:open_store("vcard");
 
 module:add_feature("vcard-temp");
-module:add_feature("urn:xmpp:pep-vcard-conversion:0");
+module:hook("account-disco-info", function (event)
+	event.reply:tag("feature", { var = "urn:xmpp:pep-vcard-conversion:0" }):up();
+end);
 
 -- Simple translations
 -- <foo><text>hey</text></foo> -> <FOO>hey</FOO>
-- 
cgit v1.2.3