Mercurial > prosody-modules
changeset 5897:896e7c7bf87f
Merge
author | Stephen Paul Weber <singpolyma@singpolyma.net> |
---|---|
date | Tue, 30 Apr 2024 15:07:06 -0500 |
parents | 5b95e06d75d5 (diff) 095030677ae6 (current diff) |
children | 7371320813a7 |
files | |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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