# HG changeset patch # User Matthew Wild # Date 1646423833 0 # Node ID e9ac68f9bc16189814429fa487c9837b8a98e4fc # Parent 1919cff763d419ea57ec030c6d21b67e6dc7305c mod_muc_restrict_media: Fix traceback when checking default (thanks Martin) diff -r 1919cff763d4 -r e9ac68f9bc16 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;