New moderator app WIP:

* #144: moderator notes WIP,
* plugin size: adding an API,
* refactoring the code from the task app, to create a new MUC App
  system.
This commit is contained in:
John Livingston
2024-07-29 18:58:02 +02:00
parent 34da786b65
commit 074e688ed8
20 changed files with 496 additions and 32 deletions

View File

@ -219,9 +219,12 @@ async function initConverse (
// * mode === chat-only + !transparent + !readonly + is using a livechat token
// Technically it would work in 'chat-only' mode, but i don't want to add too many things to test
// (and i now there is some CSS bugs in the task list).
// Same for the moderator notes app.
let enableTask = false
let enableModeratorNotes = false
if (chatIncludeMode === 'peertube-video' || chatIncludeMode === 'peertube-fullpage') {
enableTask = true
enableModeratorNotes = true
} else if (
chatIncludeMode === 'chat-only' &&
usedLivechatToken &&
@ -229,11 +232,16 @@ async function initConverse (
!initConverseParams.forceReadonly
) {
enableTask = true
enableModeratorNotes = true
}
if (enableTask) {
params.livechat_task_app_enabled = true
params.livechat_task_app_restore = chatIncludeMode === 'peertube-fullpage' || chatIncludeMode === 'chat-only'
}
if (enableModeratorNotes) {
params.livechat_note_app_enabled = true
params.livechat_note_app_restore = chatIncludeMode === 'peertube-fullpage' || chatIncludeMode === 'chat-only'
}
try {
if (window.reconnectConverse) { // this is set in the livechatSpecificsPlugin