Fix 355: Make the ConverseJS dropdown menu available everywhere (WIP)
This commit is contained in:
@ -14,6 +14,7 @@ import { slowModePlugin } from './lib/plugins/slow-mode'
|
||||
import { windowTitlePlugin } from './lib/plugins/window-title'
|
||||
import { livechatSpecificsPlugin } from './lib/plugins/livechat-specific'
|
||||
import { livechatViewerModePlugin } from './lib/plugins/livechat-viewer-mode'
|
||||
import { livechatMiniMucHeadPlugin } from './lib/plugins/livechat-mini-muc-head'
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
@ -48,6 +49,11 @@ function initConversePlugins (peertubeEmbedded: boolean): void {
|
||||
// livechatSpecifics plugins add some customization for the livechat plugin.
|
||||
converse.plugins.add('livechatSpecifics', livechatSpecificsPlugin)
|
||||
|
||||
if (peertubeEmbedded) {
|
||||
// This plugins handles some buttons that are generated by Peertube, to include them in the MUC menu.
|
||||
converse.plugins.add('livechatMiniMucHeadPlugin', livechatMiniMucHeadPlugin)
|
||||
}
|
||||
|
||||
// Viewer mode (anonymous accounts, before they have chosen their nickname).
|
||||
converse.plugins.add('livechatViewerModePlugin', livechatViewerModePlugin)
|
||||
}
|
||||
@ -154,6 +160,10 @@ async function initConverse (
|
||||
// no viewer mode if authenticated.
|
||||
params.livechat_enable_viewer_mode = autoViewerMode && !isAuthenticated && !isRemoteWithNicknameSet
|
||||
|
||||
if (chatIncludeMode === 'peertube-video') {
|
||||
params.livechat_mini_muc_head = true // we must replace the muc-head by the custom buttons toolbar.
|
||||
}
|
||||
|
||||
try {
|
||||
if (window.reconnectConverse) { // this is set in the livechatSpecificsPlugin
|
||||
window.reconnectConverse(params)
|
||||
|
Reference in New Issue
Block a user