Mercurial > prosody-modules
comparison mod_muc_restrict_media/mod_muc_restrict_media.lua @ 4789:f06d04cfea7d
mod_muc_restrict_media: Fix disco#info field (thanks mirux)
The default value for 'type' here is 'text-single', which does not
serialize boolean values.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 24 Nov 2021 16:28:35 +0100 |
parents | df2246b15075 |
children | 1919cff763d4 |
comparison
equal
deleted
inserted
replaced
4788:9084588c73ae | 4789:f06d04cfea7d |
---|---|
41 local room, form, formdata = event.room, event.form, event.formdata; | 41 local room, form, formdata = event.room, event.form, event.formdata; |
42 | 42 |
43 local allow_unaffiliated_media = not should_restrict_media(room); | 43 local allow_unaffiliated_media = not should_restrict_media(room); |
44 table.insert(form, { | 44 table.insert(form, { |
45 name = "{xmpp:prosody.im}muc#roomconfig_unaffiliated_media", | 45 name = "{xmpp:prosody.im}muc#roomconfig_unaffiliated_media", |
46 type = "boolean", | |
46 }); | 47 }); |
47 formdata["{xmpp:prosody.im}muc#roomconfig_unaffiliated_media"] = allow_unaffiliated_media; | 48 formdata["{xmpp:prosody.im}muc#roomconfig_unaffiliated_media"] = allow_unaffiliated_media; |
48 end); | 49 end); |
49 | 50 |
50 local function filter_media_tags(tag) | 51 local function filter_media_tags(tag) |