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

@ -39,7 +39,7 @@ interface RoomDefaults {
slow_mode_duration?: number
mute_anonymous?: boolean
livechat_emoji_only?: boolean
livechat_emoji_only_regexp?: string
livechat_custom_emoji_regexp?: string
livechat_muc_terms?: string
moderation_delay?: number
anonymize_moderation_actions?: boolean
@ -54,12 +54,12 @@ async function _getChannelSpecificOptions (
const channelOptions = await getChannelConfigurationOptions(options, channelId) ??
getDefaultChannelConfigurationOptions(options)
const emojiOnlyRegexp = await Emojis.singletonSafe()?.getChannelEmojisOnlyRegexp(channelId)
const customEmojisRegexp = await Emojis.singletonSafe()?.getChannelCustomEmojisRegexp(channelId)
return {
slow_mode_duration: channelOptions.slowMode.duration,
mute_anonymous: channelOptions.mute.anonymous,
livechat_emoji_only_regexp: emojiOnlyRegexp,
livechat_custom_emoji_regexp: customEmojisRegexp,
livechat_muc_terms: channelOptions.terms,
moderation_delay: channelOptions.moderation.delay,
anonymize_moderation_actions: channelOptions.moderation.anonymize