# HG changeset patch # User Matthew Wild # Date 1738863479 0 # Node ID 33806569d7c59c253ae5b3ce30cd491b1866371b # Parent 404d3644ac4aa16402e5c7afe524b8236c092f63 mod_vcard: Switch store name for MUC hosts (thanks lissine) diff -r 404d3644ac4a -r 33806569d7c5 plugins/mod_vcard.lua --- a/plugins/mod_vcard.lua Thu Feb 06 17:08:46 2025 +0000 +++ b/plugins/mod_vcard.lua Thu Feb 06 17:37:59 2025 +0000 @@ -12,11 +12,17 @@ local st = require "prosody.util.stanza" local jid_split = require "prosody.util.jid".split; -local vcards = module:open_store(); +local store_name = module:get_option_string("vcard_store_name"); + +local is_component = module:get_host_type() == "component"; +if is_component and not store_name and module:get_option_string("component_module") == "muc" then + store_name = "vcard_muc"; +end + +local vcards = module:open_store(store_name); module:add_feature("vcard-temp"); -local is_component = module:get_host_type() == "component"; local function handle_vcard(event) local session, stanza = event.origin, event.stanza;