mod_muc_restrict_media: Don't apply restriction to affiliated users
Looks like an oversight.
Assuming that all truthy affiliations are valid, and that "outcast"
would not reach this point anyway.
--- a/mod_muc_restrict_media/mod_muc_restrict_media.lua Tue Jun 14 19:08:57 2022 +0200
+++ b/mod_muc_restrict_media/mod_muc_restrict_media.lua Mon Jun 20 18:24:32 2022 +0200
@@ -63,6 +63,7 @@
module:hook("muc-occupant-groupchat", function (event)
local stanza = event.stanza;
if stanza.attr.type ~= "groupchat" then return; end
+ if event.room:get_affiliation(stanza.attr.from) then return end
if should_restrict_media(event.room) then
stanza:maptags(filter_media_tags);
end