mod_muc_restrict_media: Fix traceback when checking default (thanks Martin)
authorMatthew Wild <mwild1@gmail.com>
Fri, 04 Mar 2022 19:57:13 +0000
changeset 4909 e9ac68f9bc16
parent 4908 1919cff763d4
child 4910 f07c9a6f19b3
mod_muc_restrict_media: Fix traceback when checking default (thanks Martin)
mod_muc_restrict_media/mod_muc_restrict_media.lua
--- a/mod_muc_restrict_media/mod_muc_restrict_media.lua	Fri Mar 04 19:56:52 2022 +0000
+++ b/mod_muc_restrict_media/mod_muc_restrict_media.lua	Fri Mar 04 19:57:13 2022 +0000
@@ -24,7 +24,7 @@
 	local room, fields, changed = event.room, event.fields, event.changed;
 	local new_restrict_media = not fields["{xmpp:prosody.im}muc#roomconfig_unaffiliated_media"];
 	if new_restrict_media ~= should_restrict_media(room) then
-		if new_restrict_media == restrict_by_default(room) then
+		if new_restrict_media == restrict_by_default then
 			room._data.restrict_media = nil;
 		else
 			room._data.restrict_media = new_restrict_media;