Moderation delay WIP (#132):
* default channel value for moderation delay
This commit is contained in:
@ -97,6 +97,11 @@ local function update_room(event)
|
||||
must104 = true;
|
||||
end
|
||||
end
|
||||
if type(config.moderation_delay) == "number" then
|
||||
if room._data.moderation_delay ~= config.moderation_delay then
|
||||
room._data.moderation_delay = config.moderation_delay;
|
||||
end
|
||||
end
|
||||
if (type(config.livechat_muc_terms) == "string") then
|
||||
-- to easily detect if the value is given or not, we consider that the caller passes "" when terms must be deleted.
|
||||
if set_muc_terms then
|
||||
|
@ -7,10 +7,13 @@
|
||||
-- This version contains a modification to take into account new config options:
|
||||
-- * "slow_mode_duration"
|
||||
-- * "mute_anonymous"
|
||||
-- * "moderation_delay"
|
||||
-- These options are introduced in the Peertube livechat plugin.
|
||||
--
|
||||
-- The "slow_mode_duration" comes with mod_muc_slow_mode.
|
||||
-- There will be a XEP proposal for this one. When done, these modifications will be submitted to the mod_muc_http_defaults maintainer.
|
||||
--
|
||||
-- The "moderation_delay" comes with mod_muc_moderation_delay
|
||||
--
|
||||
|
||||
local http = require "net.http";
|
||||
@ -116,7 +119,10 @@ local function apply_config(room, settings)
|
||||
|
||||
-- specific to peertube-plugin-livechat:
|
||||
if (type(config.slow_mode_duration) == "number") and config.slow_mode_duration >= 0 then
|
||||
room._data.slow_mode_duration = config.slow_mode_duration;
|
||||
room._data.slow_mode_duration = config.slow_mode_duration;
|
||||
end
|
||||
if (type(config.moderation_delay) == "number") and config.moderation_delay >= 0 then
|
||||
room._data.moderation_delay = config.moderation_delay;
|
||||
end
|
||||
if (type(config.mute_anonymous) == "boolean") then
|
||||
room._data.x_peertubelivechat_mute_anonymous = config.mute_anonymous;
|
||||
|
Reference in New Issue
Block a user