mod_vcard_legacy: Allow disabling vcard conversion 0.11
authorKim Alvefur <zash@zash.se>
Fri, 25 Jan 2019 23:31:02 +0100
branch0.11
changeset 9817 071aaaa5cb34
parent 9816 330a937e085e
child 9818 5eb4ef537e98
mod_vcard_legacy: Allow disabling vcard conversion Once everyone has been migrated it might be nice to skip these checks
plugins/mod_vcard_legacy.lua
--- a/plugins/mod_vcard_legacy.lua	Fri Jan 25 23:27:23 2019 +0100
+++ b/plugins/mod_vcard_legacy.lua	Fri Jan 25 23:31:02 2019 +0100
@@ -307,6 +307,7 @@
 module:hook("pre-presence/bare", inject_xep153, 1);
 module:hook("pre-presence/host", inject_xep153, 1);
 
+if module:get_option_boolean("upgrade_legacy_vcards", true) then
 module:hook("resource-bind", function (event)
 	local session = event.session;
 	local username = session.username;
@@ -331,3 +332,4 @@
 		session.log("info", "Failed to migrate vCard-temp to PEP: %s", err or "problem emptying 'vcard' store");
 	end
 end);
+end