Merge branch 'main' of https://github.com/JohnXLivingston/peertube-plugin-livechat
This commit is contained in:
@ -1,41 +0,0 @@
|
||||
{
|
||||
"root": true,
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true
|
||||
},
|
||||
"extends": [
|
||||
"standard-with-typescript"
|
||||
],
|
||||
"globals": {},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2018,
|
||||
"project": [
|
||||
"./server/tsconfig.json",
|
||||
"./client/tsconfig.json"
|
||||
]
|
||||
},
|
||||
"plugins": [
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"ignorePatterns": [],
|
||||
"rules": {
|
||||
"@typescript-eslint/no-unused-vars": [2, {"argsIgnorePattern": "^_"}],
|
||||
"@typescript-eslint/no-floating-promises": "error",
|
||||
"@typescript-eslint/no-misused-promises": "error",
|
||||
"@typescript-eslint/no-var-requires": "off",
|
||||
"@typescript-eslint/strict-boolean-expressions": "off",
|
||||
"@typescript-eslint/return-await": [2, "in-try-catch"], // FIXME: correct?
|
||||
"@typescript-eslint/no-invalid-void-type": "off",
|
||||
"@typescript-eslint/triple-slash-reference": "off",
|
||||
"max-len": [
|
||||
"error",
|
||||
{
|
||||
"code": 120,
|
||||
"comments": 120
|
||||
}
|
||||
],
|
||||
"no-unused-vars": "off"
|
||||
}
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
SPDX-FileCopyrightText: 2024 John Livingston <https://www.john-livingston.fr/>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
@ -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