Mercurial > prosody-modules
changeset 4416:dd3bfe8f182e
mod_groups_migration: make default group name configurable
author | Jonas Schäfer <jonas@wielicki.name> |
---|---|
date | Sat, 30 Jan 2021 16:31:15 +0100 |
parents | c7424b96c75e |
children | 7e379ccb8ed6 |
files | mod_groups_migration/mod_groups_migration.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_groups_migration/mod_groups_migration.lua Sat Jan 30 16:25:12 2021 +0100 +++ b/mod_groups_migration/mod_groups_migration.lua Sat Jan 30 16:31:15 2021 +0100 @@ -3,6 +3,7 @@ local mod_groups = module:depends("groups_internal"); local default_group_id = module:get_option("group_default_id", "default"); +local default_group_name = module:get_option("group_default_name", "default"); local function trigger_migration() if mod_groups.exists(default_group_id) then @@ -12,7 +13,7 @@ module:log("info", "migrating to mod_groups!") local group_id = default_group_id; - local ok, err = mod_groups.create({name="default"}, true, group_id); + local ok, err = mod_groups.create({name=default_group_name}, true, group_id); if not ok then module:log("error", "failed to create group: %s", err) return