Software /
code /
prosody-modules
Comparison
mod_muc_restrict_media/mod_muc_restrict_media.lua @ 4962:5a3031613dbc
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 20 Jun 2022 18:24:32 +0200 |
parent | 4905:e9ac68f9bc16 |
child | 5171:1682166171ff |
comparison
equal
deleted
inserted
replaced
4961:18774cc621d6 | 4962:5a3031613dbc |
---|---|
61 end | 61 end |
62 | 62 |
63 module:hook("muc-occupant-groupchat", function (event) | 63 module:hook("muc-occupant-groupchat", function (event) |
64 local stanza = event.stanza; | 64 local stanza = event.stanza; |
65 if stanza.attr.type ~= "groupchat" then return; end | 65 if stanza.attr.type ~= "groupchat" then return; end |
66 if event.room:get_affiliation(stanza.attr.from) then return end | |
66 if should_restrict_media(event.room) then | 67 if should_restrict_media(event.room) then |
67 stanza:maptags(filter_media_tags); | 68 stanza:maptags(filter_media_tags); |
68 end | 69 end |
69 end, 20); | 70 end, 20); |