Comparison

mod_groups_internal/mod_groups_internal.lua @ 4404:a5a0b51d26e9

mod_groups_internal: Remove unused local function
author Matthew Wild <mwild1@gmail.com>
date Wed, 27 Jan 2021 14:55:22 +0000
parent 4403:31470a256851
child 4405:76d045f76f65
comparison
equal deleted inserted replaced
4403:31470a256851 4404:a5a0b51d26e9
70 module:hook("resource-bind", function(event) 70 module:hook("resource-bind", function(event)
71 module:log("debug", "Updating group subscriptions..."); 71 module:log("debug", "Updating group subscriptions...");
72 do_all_group_subscriptions_by_user(event.session.username); 72 do_all_group_subscriptions_by_user(event.session.username);
73 end); 73 end);
74 74
75 local function get_group_muc(group_id)
76 -- Group MUC
77 local group_info = group_info_store:get(group_id);
78 if group_info and group_info.muc_jid then
79 local muc_jid = group_info.muc_jid;
80 local mod_muc = hosts[jid.host(muc_jid)].modules.muc;
81 if mod_muc then
82 local room = mod_muc.get_room_from_jid(muc_jid);
83 if not room then
84 room = mod_muc.create_room(muc_jid);
85 end
86 return room;
87 end
88 end
89 end
90
91 --luacheck: ignore 131 75 --luacheck: ignore 131
92 function create(group_info, create_muc, group_id) 76 function create(group_info, create_muc, group_id)
93 if not group_info.name then 77 if not group_info.name then
94 return nil, "group-name-required"; 78 return nil, "group-name-required";
95 end 79 end