Removed the settings «Chats are only available for local videos».
From now on, webchat can only be activated for local videos. It will never be displayed on remote videos. This is because an incompatibility with a new feature (webchat per channel). Moreover this feature was very limited: the webchat was not shared with the remote instance (this will probably be achieved in a future release).
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
import { parseConfigUUIDs } from './config'
|
||||
|
||||
interface SharedSettings {
|
||||
'chat-only-locals': boolean
|
||||
'chat-per-live-video': boolean
|
||||
'chat-all-lives': boolean
|
||||
'chat-all-non-lives': boolean
|
||||
@ -27,12 +26,11 @@ interface SharedVideoBackend extends SharedVideoBase {
|
||||
type SharedVideo = SharedVideoBackend | SharedVideoFrontend
|
||||
|
||||
function videoHasWebchat (settings: SharedSettings, video: SharedVideo): boolean {
|
||||
if (settings['chat-only-locals']) {
|
||||
if ('isLocal' in video) {
|
||||
if (!video.isLocal) return false
|
||||
} else {
|
||||
if (video.remote) return false
|
||||
}
|
||||
// Never use webchat on remote videos.
|
||||
if ('isLocal' in video) {
|
||||
if (!video.isLocal) return false
|
||||
} else {
|
||||
if (video.remote) return false
|
||||
}
|
||||
|
||||
if (settings['chat-per-live-video'] && video.isLive && video.pluginData && video.pluginData['livechat-active']) {
|
||||
|
Reference in New Issue
Block a user