Converse upstream updates.

This commit is contained in:
John Livingston
2024-07-15 12:09:25 +02:00
parent a0d5c4a368
commit d0ab3d94ae
5 changed files with 6 additions and 11 deletions

View File

@ -16,7 +16,7 @@ export const livechatMiniMucHeadPlugin = {
})
_converse.api.listen.on('getHeadingButtons', (view: any, buttons: any[]) => {
if (view.model.get('type') !== _converse.CHATROOMS_TYPE) {
if (view.model.get('type') !== _converse.constants.CHATROOMS_TYPE) {
// only on MUC.
return buttons
}

View File

@ -15,7 +15,7 @@ export const livechatSpecificsPlugin = {
})
_converse.api.listen.on('getHeadingButtons', (view: any, buttons: any[]) => {
if (view.model.get('type') !== _converse.CHATROOMS_TYPE) {
if (view.model.get('type') !== _converse.constants.CHATROOMS_TYPE) {
// only on MUC.
return buttons
}
@ -114,11 +114,6 @@ export const livechatSpecificsPlugin = {
// We are probably on a dev instance, so we will add _converse in window:
(window as any)._livechatConverse = _converse
}
// Temporary Fix, because v11 removes some constants from _converse.
// TODO: remove this line, and replace by something else.
// Waiting for response to https://github.com/conversejs/converse.js/issues/3440
_converse.CHATROOMS_TYPE = 'chatroom'
},
overrides: {
ChatRoom: {