changeset 4420:a81516906822

mod_muc_defaults: handle case where affiliations are unset Otherwise, this tracebacks in set_affiliations.
author Jonas Schäfer <jonas@wielicki.name>
date Sun, 31 Jan 2021 16:12:47 +0100
parents 1185acb2ab91
children 94805a7e7b30
files mod_muc_defaults/mod_muc_defaults.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_muc_defaults/mod_muc_defaults.lua	Sun Jan 31 16:09:14 2021 +0100
+++ b/mod_muc_defaults/mod_muc_defaults.lua	Sun Jan 31 16:12:47 2021 +0100
@@ -85,5 +85,7 @@
 		module:log("debug", "Configuring already existing room %s", room_jid);
 	end
 	configure_room(room, room_data.config);
-	set_affiliations(room, room_data.affiliations);
+	if room_data.affiliations then
+		set_affiliations(room, room_data.affiliations);
+	end
 end