Changeset

4384:205a027d86f3

mod_invites_register: port to mod_groups_internal
author Jonas Schäfer <jonas@wielicki.name>
date Mon, 25 Jan 2021 18:43:48 +0100
parents 4383:1e7406b85add
children 4385:dfb34cc97028
files mod_invites_register/mod_invites_register.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_invites_register/mod_invites_register.lua	Mon Jan 25 18:43:20 2021 +0100
+++ b/mod_invites_register/mod_invites_register.lua	Mon Jan 25 18:43:48 2021 +0100
@@ -3,6 +3,8 @@
 local jid_bare = require "util.jid".bare;
 local rostermanager = require "core.rostermanager";
 
+local mod_groups = module:depends("groups_internal");
+
 local require_encryption = module:get_option_boolean("c2s_require_encryption",
 	module:get_option_boolean("require_encryption", false));
 local invite_only = module:get_option_boolean("registration_invite_only", true);
@@ -148,7 +150,7 @@
 		if groups then
 			module:log("Adding to groups...");
 			for _, group in ipairs(groups) do
-				module:open_store("groups", "map"):set(group, contact_username, true);
+				mod_groups.add_member(group, contact_username);
 			end
 		end
 	end