Chat can be enabled in video properties.
This commit is contained in:
@ -2,6 +2,7 @@ import { parseConfigUUIDs } from './config'
|
||||
|
||||
interface SharedSettings {
|
||||
'chat-only-locals': boolean
|
||||
'chat-per-live-video': boolean
|
||||
'chat-all-lives': boolean
|
||||
'chat-all-non-lives': boolean
|
||||
'chat-videos-list': string
|
||||
@ -10,6 +11,9 @@ interface SharedSettings {
|
||||
interface SharedVideoBase {
|
||||
uuid: string
|
||||
isLive: boolean
|
||||
pluginData?: {
|
||||
'livechat-active'?: boolean
|
||||
}
|
||||
}
|
||||
|
||||
interface SharedVideoFrontend extends SharedVideoBase {
|
||||
@ -31,6 +35,10 @@ function videoHasWebchat (settings: SharedSettings, video: SharedVideo): boolean
|
||||
}
|
||||
}
|
||||
|
||||
if (settings['chat-per-live-video'] && video.isLive && video.pluginData && video.pluginData['livechat-active']) {
|
||||
return true
|
||||
}
|
||||
|
||||
if (settings['chat-all-lives']) {
|
||||
if (video.isLive) return true
|
||||
}
|
||||
|
Reference in New Issue
Block a user