Authentication token generation (#98):
* setting to disable the feature (aka "panic button")
This commit is contained in:
@ -18,6 +18,7 @@ export type LiveChatSettings = SettingEntries & {
|
||||
'prosody-room-allow-s2s': boolean
|
||||
'converse-theme': ConverseJSTheme
|
||||
'prosody-room-type': string
|
||||
'livechat-token-disabled': boolean
|
||||
}
|
||||
|
||||
export class PtContext {
|
||||
|
@ -111,7 +111,12 @@ export class ShareChatElement extends LivechatElement {
|
||||
// Note: for dockEnabled, we check:
|
||||
// * that the user is logged in
|
||||
// * that the video is local (for remote video, tests case are too complicated, and it's not the main use case, so…)
|
||||
this.dockEnabled = !isAnonymousUser(this.ptContext.ptOptions) && this._video.isLocal
|
||||
// * settings is not disabled
|
||||
this.dockEnabled = (
|
||||
!isAnonymousUser(this.ptContext.ptOptions) &&
|
||||
this._video.isLocal &&
|
||||
!settings['livechat-token-disabled']
|
||||
)
|
||||
this.autocolorsAvailable = isAutoColorsAvailable(settings['converse-theme'])
|
||||
|
||||
this._restorePreviousState()
|
||||
|
Reference in New Issue
Block a user