Hidden force_default_hide_muc_participants query parameter, for testing
purpose.
This commit is contained in:
parent
9eb986ea85
commit
5d4bfceb73
@ -9,7 +9,7 @@ import type { AuthentInfos } from './auth'
|
|||||||
* @returns default parameters to provide to ConverseJS.
|
* @returns default parameters to provide to ConverseJS.
|
||||||
*/
|
*/
|
||||||
function defaultConverseParams (
|
function defaultConverseParams (
|
||||||
{ forceReadonly, theme, assetsPath, room }: InitConverseJSParams,
|
{ forceReadonly, theme, assetsPath, room, forceDefaultHideMucParticipants }: InitConverseJSParams,
|
||||||
isInIframe: boolean
|
isInIframe: boolean
|
||||||
): any {
|
): any {
|
||||||
const mucShowInfoMessages = forceReadonly
|
const mucShowInfoMessages = forceReadonly
|
||||||
@ -49,7 +49,8 @@ function defaultConverseParams (
|
|||||||
show_tab_notifications: false,
|
show_tab_notifications: false,
|
||||||
singleton: true,
|
singleton: true,
|
||||||
auto_focus: !isInIframe,
|
auto_focus: !isInIframe,
|
||||||
hide_muc_participants: isInIframe,
|
// forceDefaultHideMucParticipants is for testing purpose
|
||||||
|
hide_muc_participants: isInIframe || forceDefaultHideMucParticipants === true,
|
||||||
play_sounds: false,
|
play_sounds: false,
|
||||||
muc_mention_autocomplete_min_chars: 2,
|
muc_mention_autocomplete_min_chars: 2,
|
||||||
muc_mention_autocomplete_filter: 'contains',
|
muc_mention_autocomplete_filter: 'contains',
|
||||||
|
@ -21,6 +21,7 @@ interface GetConverseJSParamsParams {
|
|||||||
readonly?: boolean | 'noscroll'
|
readonly?: boolean | 'noscroll'
|
||||||
transparent?: boolean
|
transparent?: boolean
|
||||||
forcetype?: boolean
|
forcetype?: boolean
|
||||||
|
forceDefaultHideMucParticipants?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -86,7 +87,10 @@ async function getConverseJSParams (
|
|||||||
autoViewerMode,
|
autoViewerMode,
|
||||||
theme: converseJSTheme,
|
theme: converseJSTheme,
|
||||||
forceReadonly,
|
forceReadonly,
|
||||||
transparent
|
transparent,
|
||||||
|
// forceDefaultHideMucParticipants is for testing purpose
|
||||||
|
// (so we can stress test with the muc participant list hidden by default)
|
||||||
|
forceDefaultHideMucParticipants: params.forceDefaultHideMucParticipants
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,8 @@ async function initWebchatRouter (options: RegisterServerOptionsV5): Promise<Rou
|
|||||||
const initConverseJSParam = await getConverseJSParams(options, roomKey, {
|
const initConverseJSParam = await getConverseJSParams(options, roomKey, {
|
||||||
readonly,
|
readonly,
|
||||||
transparent: req.query._transparent === 'true',
|
transparent: req.query._transparent === 'true',
|
||||||
forcetype: req.query.forcetype === '1'
|
forcetype: req.query.forcetype === '1',
|
||||||
|
forceDefaultHideMucParticipants: req.query.force_default_hide_muc_participants === '1'
|
||||||
})
|
})
|
||||||
|
|
||||||
if (('isError' in initConverseJSParam)) {
|
if (('isError' in initConverseJSParam)) {
|
||||||
|
@ -18,6 +18,7 @@ interface InitConverseJSParams {
|
|||||||
forceReadonly: boolean | 'noscroll'
|
forceReadonly: boolean | 'noscroll'
|
||||||
theme: ConverseJSTheme
|
theme: ConverseJSTheme
|
||||||
transparent: boolean
|
transparent: boolean
|
||||||
|
forceDefaultHideMucParticipants?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ProsodyListRoomsResultError {
|
interface ProsodyListRoomsResultError {
|
||||||
|
Loading…
Reference in New Issue
Block a user