Prosody mode only:

Removing old modes (ConverseJS and External URI).
Work in progress.
This commit is contained in:
John Livingston
2022-10-10 18:08:20 +02:00
parent e2ec66bf37
commit 7906ddf625
20 changed files with 98 additions and 572 deletions

View File

@ -253,20 +253,15 @@ function register (registerOptions: RegisterClientOptions): void {
}
let showShareUrlButton: boolean = false
if (settings['chat-type'] === 'builtin-prosody') {
// The share url functionality should be technically possible for other modes
// than builtin-prosody. But it is too difficult to maintain.
// So I choose to enable it only for builtin-prosody.
const chatShareUrl = settings['chat-share-url'] ?? ''
if (chatShareUrl === 'everyone') {
showShareUrlButton = true
} else if (chatShareUrl === 'owner') {
showShareUrlButton = guessIsMine(registerOptions, video)
} else if (chatShareUrl === 'owner+moderators') {
showShareUrlButton = guessIsMine(registerOptions, video) || guessIamIModerator(registerOptions)
}
const chatShareUrl = settings['chat-share-url'] ?? ''
if (chatShareUrl === 'everyone') {
showShareUrlButton = true
} else if (chatShareUrl === 'owner') {
showShareUrlButton = guessIsMine(registerOptions, video)
} else if (chatShareUrl === 'owner+moderators') {
showShareUrlButton = guessIsMine(registerOptions, video) || guessIamIModerator(registerOptions)
}
insertChatDom(container as HTMLElement, video, !!settings['chat-open-blank'], showShareUrlButton).then(() => {
if (settings['chat-auto-display']) {
openChat(video)