Emoji only mode WIP

This commit is contained in:
John Livingston
2024-09-05 18:28:54 +02:00
parent 2f78b901e3
commit 1a75b30c50
20 changed files with 375 additions and 6 deletions

View File

@ -9,6 +9,9 @@
-- * "mute_anonymous"
-- * "moderation_delay"
-- * "anonymize_moderation_actions"
-- * "livechat_emoji_only"
-- * "livechat_emoji_only_regexp"
-- * "livechat_muc_terms"
-- These options are introduced in the Peertube livechat plugin.
--
-- The "slow_mode_duration" comes with mod_muc_slow_mode.
@ -128,6 +131,12 @@ local function apply_config(room, settings)
if (type(config.mute_anonymous) == "boolean") then
room._data.x_peertubelivechat_mute_anonymous = config.mute_anonymous;
end
if (type(config.livechat_emoji_only) == "boolean") then
room._data.x_peertubelivechat_emoji_only_mode = config.livechat_emoji_only;
end
if (type(config.livechat_emoji_only_regexp) == "string" and config.livechat_emoji_only_regexp ~= "") then
room._data.x_peertubelivechat_emoji_only_regexp = config.emoji_only_regexp;
end
if (type(config.livechat_muc_terms) == "string") then
-- we don't need to use set_muc_terms here, as this is called for a newly created room
-- (and thus we don't need to broadcast changes)