Merge branch 'main' of https://github.com/JohnXLivingston/peertube-plugin-livechat
This commit is contained in:
		| @ -3,3 +3,9 @@ | ||||
| // SPDX-License-Identifier: AGPL-3.0-only | ||||
|  | ||||
| export const channelTermsMaxLength = 400 | ||||
|  | ||||
| export const forbidSpecialCharsDefaultTolerance = 0 | ||||
| export const forbidSpecialCharsMaxTolerance = 10 | ||||
|  | ||||
| export const noDuplicateMaxDelay = 86400 | ||||
| export const noDuplicateDefaultDelay = 60 | ||||
|  | ||||
| @ -96,6 +96,8 @@ interface ChannelConfigurationOptions { | ||||
|     forbiddenWords: ChannelForbiddenWords[] | ||||
|     quotes: ChannelQuotes[] | ||||
|     commands: ChannelCommands[] | ||||
|     forbidSpecialChars: ChannelForbidSpecialChars | ||||
|     noDuplicate: ChannelNoDuplicate | ||||
|     // TODO: bannedJIDs: string[] | ||||
|   } | ||||
|   slowMode: { | ||||
| @ -132,6 +134,20 @@ interface ChannelCommands { | ||||
|   message: string | ||||
| } | ||||
|  | ||||
| interface ChannelForbidSpecialChars { | ||||
|   enabled: boolean | ||||
|   tolerance: number | ||||
|   reason: string | ||||
|   applyToModerators: boolean | ||||
| } | ||||
|  | ||||
| interface ChannelNoDuplicate { | ||||
|   enabled: boolean | ||||
|   reason: string | ||||
|   delay: number | ||||
|   applyToModerators: boolean | ||||
| } | ||||
|  | ||||
| interface ChannelConfiguration { | ||||
|   channel: ChannelInfos | ||||
|   configuration: ChannelConfigurationOptions | ||||
|  | ||||
| @ -44,7 +44,7 @@ function videoHasWebchat (settings: VideoHasWebchatSettings, video: SharedVideo) | ||||
|     if (video.remote) return false | ||||
|   } | ||||
|  | ||||
|   if (settings['chat-per-live-video'] && video.isLive && video.pluginData && video.pluginData['livechat-active']) { | ||||
|   if (settings['chat-per-live-video'] && video.isLive && video.pluginData?.['livechat-active']) { | ||||
|     return true | ||||
|   } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user