diff --git a/conversejs/build-conversejs.sh b/conversejs/build-conversejs.sh index 84b7b860..4d3e8e76 100644 --- a/conversejs/build-conversejs.sh +++ b/conversejs/build-conversejs.sh @@ -18,7 +18,7 @@ set -x CONVERSE_VERSION="v11.0.0" CONVERSE_REPO="https://github.com/conversejs/converse.js.git" # You can eventually set CONVERSE_COMMIT to a specific commit ID, if you want to apply some patches. -CONVERSE_COMMIT="ef86863cbd983f0c2de6c3b81105800bcbb804d4" +CONVERSE_COMMIT="46313ad92c1a861bcb50b9653859cfa9a960ae4a" # 2014-01-16: we are using a custom version, to wait for some PR to be apply upstream. # This version includes following changes: diff --git a/conversejs/custom/plugins/poll/utils.js b/conversejs/custom/plugins/poll/utils.js index ecb4266d..f10172b4 100644 --- a/conversejs/custom/plugins/poll/utils.js +++ b/conversejs/custom/plugins/poll/utils.js @@ -8,7 +8,7 @@ import { __ } from 'i18n' export function getHeadingButtons (view, buttons) { const muc = view.model - if (muc.get('type') !== _converse.CHATROOMS_TYPE) { + if (muc.get('type') !== _converse.constants.CHATROOMS_TYPE) { // only on MUC. return buttons } diff --git a/conversejs/custom/plugins/tasks/utils.js b/conversejs/custom/plugins/tasks/utils.js index 65700a5e..00f941e4 100644 --- a/conversejs/custom/plugins/tasks/utils.js +++ b/conversejs/custom/plugins/tasks/utils.js @@ -9,7 +9,7 @@ import { __ } from 'i18n' export function getHeadingButtons (view, buttons) { const muc = view.model - if (muc.get('type') !== _converse.CHATROOMS_TYPE) { + if (muc.get('type') !== _converse.constants.CHATROOMS_TYPE) { // only on MUC. return buttons } @@ -127,7 +127,7 @@ function _destroyChatRoomTaskLists (mucModel) { } export function initOrDestroyChatRoomTaskLists (mucModel) { - if (mucModel.get('type') !== _converse.CHATROOMS_TYPE) { + if (mucModel.get('type') !== _converse.constants.CHATROOMS_TYPE) { // only on MUC. return _destroyChatRoomTaskLists(mucModel) } diff --git a/conversejs/lib/plugins/livechat-mini-muc-head.ts b/conversejs/lib/plugins/livechat-mini-muc-head.ts index 82f71484..49815919 100644 --- a/conversejs/lib/plugins/livechat-mini-muc-head.ts +++ b/conversejs/lib/plugins/livechat-mini-muc-head.ts @@ -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 } diff --git a/conversejs/lib/plugins/livechat-specific.ts b/conversejs/lib/plugins/livechat-specific.ts index a5e4dbf1..72ee34e8 100644 --- a/conversejs/lib/plugins/livechat-specific.ts +++ b/conversejs/lib/plugins/livechat-specific.ts @@ -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: {