comparison mod_groups_internal/mod_groups_internal.lua @ 4403:31470a256851

mod_groups_internal: Prep MUC JID before exposing/storing it (just in case)
author Matthew Wild <mwild1@gmail.com>
date Wed, 27 Jan 2021 14:52:30 +0000
parents 846b7af5588c
children a5a0b51d26e9
comparison
equal deleted inserted replaced
4402:85c11eb4331b 4403:31470a256851
111 if not muc_host then 111 if not muc_host then
112 module:log("error", "cannot create group with MUC: MUC host %s not configured properly", muc_host_name) 112 module:log("error", "cannot create group with MUC: MUC host %s not configured properly", muc_host_name)
113 return nil, "internal-server-error" 113 return nil, "internal-server-error"
114 end 114 end
115 115
116 muc_jid = id.short() .. "@" .. muc_host_name 116 muc_jid = jid.prep(id.short() .. "@" .. muc_host_name);
117 room = muc_host.create_room(muc_jid) 117 room = muc_host.create_room(muc_jid)
118 if not room then 118 if not room then
119 delete_group(group_id) 119 delete_group(group_id)
120 return nil, "internal-server-error" 120 return nil, "internal-server-error"
121 end 121 end