Emoji only mode WIP:

* refactoring + optimization
* migration
This commit is contained in:
John Livingston
2024-09-06 11:01:48 +02:00
parent b115c28ee7
commit 08017ac2bb
12 changed files with 172 additions and 50 deletions

View File

@ -10,7 +10,7 @@
-- * "moderation_delay"
-- * "anonymize_moderation_actions"
-- * "livechat_emoji_only"
-- * "livechat_emoji_only_regexp"
-- * "livechat_custom_emoji_regexp"
-- * "livechat_muc_terms"
-- These options are introduced in the Peertube livechat plugin.
--
@ -134,8 +134,8 @@ local function apply_config(room, settings)
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.livechat_emoji_only_regexp;
if (type(config.livechat_custom_emoji_regexp) == "string" and config.livechat_custom_emoji_regexp ~= "") then
room._data.x_peertubelivechat_custom_emoji_regexp = config.livechat_custom_emoji_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