aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-01-25 23:31:02 +0100
committerKim Alvefur <zash@zash.se>2019-01-25 23:31:02 +0100
commit8f496d58a84e1e061acba2e9e23de45bd2ff2da1 (patch)
treeb23bb8c9ec091d17a1e0ede09eb066103a11490b
parentb4d5a986eb72cf396aa32528bf9eed5f40a2a12b (diff)
downloadprosody-8f496d58a84e1e061acba2e9e23de45bd2ff2da1.tar.gz
prosody-8f496d58a84e1e061acba2e9e23de45bd2ff2da1.zip
mod_vcard_legacy: Allow disabling vcard conversion
Once everyone has been migrated it might be nice to skip these checks
-rw-r--r--plugins/mod_vcard_legacy.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_vcard_legacy.lua b/plugins/mod_vcard_legacy.lua
index 633b7729..7dff1d09 100644
--- a/plugins/mod_vcard_legacy.lua
+++ b/plugins/mod_vcard_legacy.lua
@@ -307,6 +307,7 @@ module:hook("pre-presence/full", inject_xep153, 1);
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 @@ module:hook("resource-bind", function (event)
session.log("info", "Failed to migrate vCard-temp to PEP: %s", err or "problem emptying 'vcard' store");
end
end);
+end