Option to hide moderator name who made actions WIP (#137).
This commit is contained in:
@ -38,6 +38,7 @@ async function sanitizeChannelConfigurationOptions (
|
||||
|
||||
const moderationData = data.moderation ?? {} // comes with livechat 10.3.0
|
||||
moderationData.delay ??= 0
|
||||
moderationData.anonymize ??= false // comes with livechat 11.0.0
|
||||
|
||||
// mute not present in livechat <= 10.2.0
|
||||
const mute = data.mute ?? {}
|
||||
@ -73,7 +74,8 @@ async function sanitizeChannelConfigurationOptions (
|
||||
anonymous: _readBoolean(mute, 'anonymous')
|
||||
},
|
||||
moderation: {
|
||||
delay: _readInteger(moderationData, 'delay', 0, 60)
|
||||
delay: _readInteger(moderationData, 'delay', 0, 60),
|
||||
anonymize: _readBoolean(moderationData, 'anonymize')
|
||||
}
|
||||
}
|
||||
if (terms !== undefined) {
|
||||
|
@ -54,7 +54,8 @@ function getDefaultChannelConfigurationOptions (_options: RegisterServerOptions)
|
||||
anonymous: false
|
||||
},
|
||||
moderation: {
|
||||
delay: 0
|
||||
delay: 0,
|
||||
anonymize: false
|
||||
},
|
||||
terms: undefined
|
||||
}
|
||||
|
@ -255,6 +255,9 @@ class ProsodyConfigContent {
|
||||
|
||||
this.muc.add('modules_enabled', 'muc_moderation_delay')
|
||||
this.muc.set('moderation_delay_form_position', 118)
|
||||
|
||||
this.muc.add('modules_enabled', 'muc_anonymize_moderation_actions')
|
||||
this.muc.set('anonymize_moderation_actions_form_position', 117)
|
||||
}
|
||||
|
||||
useAnonymous (autoBanIP: boolean): void {
|
||||
|
@ -39,6 +39,7 @@ interface RoomDefaults {
|
||||
mute_anonymous?: boolean
|
||||
livechat_muc_terms?: string
|
||||
moderation_delay?: number
|
||||
anonymize_moderation_actions?: boolean
|
||||
}
|
||||
affiliations?: Affiliations
|
||||
}
|
||||
@ -54,7 +55,8 @@ async function _getChannelSpecificOptions (
|
||||
slow_mode_duration: channelOptions.slowMode.duration,
|
||||
mute_anonymous: channelOptions.mute.anonymous,
|
||||
livechat_muc_terms: channelOptions.terms,
|
||||
moderation_delay: channelOptions.moderation.delay
|
||||
moderation_delay: channelOptions.moderation.delay,
|
||||
anonymize_moderation_actions: channelOptions.moderation.anonymize
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user