# HG changeset patch # User Stephen Paul Weber # Date 1714507626 18000 # Node ID 896e7c7bf87f44c8f94dce473fae3ddddcda5f30 # Parent 5b95e06d75d5a9e60dc06659febbb7c05c0ab80a# Parent 095030677ae62e6fe615764b3536131b76cf78b5 Merge diff -r 095030677ae6 -r 896e7c7bf87f mod_muc_restrict_avatars/mod_muc_restrict_avatars.lua --- a/mod_muc_restrict_avatars/mod_muc_restrict_avatars.lua Mon Apr 29 17:49:19 2024 +0100 +++ b/mod_muc_restrict_avatars/mod_muc_restrict_avatars.lua Tue Apr 30 15:07:06 2024 -0500 @@ -30,7 +30,7 @@ local room, fields, changed = event.room, event.fields, event.changed; local restrict_avatars = fields["restrict_avatars"]; - if restrict_avatars ~= is_avatar_restriction_enabled(room) then + if room and restrict_avatars ~= is_avatar_restriction_enabled(room) then -- Update room settings based on the submitted value room._data.restrict_avatars = restrict_avatars; -- Mark the configuration as changed @@ -46,7 +46,7 @@ module:hook("presence/full", function(event) local stanza = event.stanza; local room = mod_muc.get_room_from_jid(bare_jid(stanza.attr.to)); - if not room:get_affiliation(stanza.attr.from) then + if room and not room:get_affiliation(stanza.attr.from) then if is_avatar_restriction_enabled(room) then stanza:maptags(filter_avatar_advertisement); end