diff --git a/conversejs/build-conversejs.sh b/conversejs/build-conversejs.sh
index 239c2918..84b7b860 100644
--- a/conversejs/build-conversejs.sh
+++ b/conversejs/build-conversejs.sh
@@ -15,10 +15,10 @@ set -x
# Set CONVERSE_VERSION and CONVERSE_REPO to select which repo and tag/commit/branch use.
# Defaults values:
-CONVERSE_VERSION="v10.1.6"
+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=""
+CONVERSE_COMMIT="ef86863cbd983f0c2de6c3b81105800bcbb804d4"
# 2014-01-16: we are using a custom version, to wait for some PR to be apply upstream.
# This version includes following changes:
@@ -38,9 +38,9 @@ CONVERSE_COMMIT=""
# - New config option [colorize_username](https://conversejs.org/docs/html/configuration.html#colorize_username)
# - New loadEmojis hook, to customize emojis at runtime.
# - Fix custom emojis path when assets_path is not the default path.
-CONVERSE_VERSION="livechat-10.1.0"
-# CONVERSE_COMMIT="4402fcc3fc60f6c9334f86528c33a0b463371d12"
-CONVERSE_REPO="https://github.com/JohnXLivingston/converse.js"
+# CONVERSE_VERSION="livechat-10.1.0"
+# # CONVERSE_COMMIT="4402fcc3fc60f6c9334f86528c33a0b463371d12"
+# CONVERSE_REPO="https://github.com/JohnXLivingston/converse.js"
rootdir="$(pwd)"
src_dir="$rootdir/conversejs"
diff --git a/conversejs/custom/index.js b/conversejs/custom/index.js
index 51d352c5..00dbc0c6 100644
--- a/conversejs/custom/index.js
+++ b/conversejs/custom/index.js
@@ -13,7 +13,7 @@ import './i18n/index.js'
import 'shared/registry.js'
import { CustomElement } from 'shared/components/element'
import { VIEW_PLUGINS } from './shared/constants.js'
-import { _converse, converse } from '@converse/headless/core'
+import { _converse, converse } from '@converse/headless'
import 'shared/styles/index.scss'
diff --git a/conversejs/custom/livechat-external-login-content.js b/conversejs/custom/livechat-external-login-content.js
index 10f4b099..5bca5b5c 100644
--- a/conversejs/custom/livechat-external-login-content.js
+++ b/conversejs/custom/livechat-external-login-content.js
@@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0-only
-import { api } from '@converse/headless/core.js'
+import { api } from '@converse/headless/index.js'
import { CustomElement } from 'shared/components/element.js'
import { tplExternalLoginModal } from 'templates/livechat-external-login-modal.js'
import { __ } from 'i18n'
diff --git a/conversejs/custom/plugins/poll/components/poll-form-view.js b/conversejs/custom/plugins/poll/components/poll-form-view.js
index a0fba934..8d2f4b12 100644
--- a/conversejs/custom/plugins/poll/components/poll-form-view.js
+++ b/conversejs/custom/plugins/poll/components/poll-form-view.js
@@ -4,7 +4,7 @@
import { XMLNS_POLL } from '../constants.js'
import { tplPollForm } from '../templates/poll-form.js'
import { CustomElement } from 'shared/components/element.js'
-import { converse, api } from '@converse/headless/core'
+import { converse, api } from '@converse/headless'
import { webForm2xForm } from '@converse/headless/utils/form'
import { __ } from 'i18n'
import '../styles/poll-form.scss'
diff --git a/conversejs/custom/plugins/poll/components/poll-view.js b/conversejs/custom/plugins/poll/components/poll-view.js
index 9973aa99..a51c5d02 100644
--- a/conversejs/custom/plugins/poll/components/poll-view.js
+++ b/conversejs/custom/plugins/poll/components/poll-view.js
@@ -4,7 +4,7 @@
import { tplPoll } from '../templates/poll.js'
import { CustomElement } from 'shared/components/element.js'
-import { converse, _converse, api } from '@converse/headless/core'
+import { converse, _converse, api } from '@converse/headless'
import '../styles/poll.scss'
export default class MUCPollView extends CustomElement {
diff --git a/conversejs/custom/plugins/poll/index.js b/conversejs/custom/plugins/poll/index.js
index d7e94b0c..749b4891 100644
--- a/conversejs/custom/plugins/poll/index.js
+++ b/conversejs/custom/plugins/poll/index.js
@@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0-only
-import { _converse, converse } from '../../../src/headless/core.js'
+import { _converse, converse } from '../../../src/headless/index.js'
import { getHeadingButtons } from './utils.js'
import { POLL_MESSAGE_TAG, POLL_QUESTION_TAG, POLL_CHOICE_TAG } from './constants.js'
import { __ } from 'i18n'
diff --git a/conversejs/custom/plugins/poll/modals/poll-form.js b/conversejs/custom/plugins/poll/modals/poll-form.js
index f56bb9c3..7d51eb05 100644
--- a/conversejs/custom/plugins/poll/modals/poll-form.js
+++ b/conversejs/custom/plugins/poll/modals/poll-form.js
@@ -4,7 +4,7 @@
import { __ } from 'i18n'
import BaseModal from 'plugins/modal/modal.js'
-import { api } from '@converse/headless/core'
+import { api } from '@converse/headless'
import { modal_close_button as ModalCloseButton } from 'plugins/modal/templates/buttons.js'
import { html } from 'lit'
diff --git a/conversejs/custom/plugins/poll/templates/poll.js b/conversejs/custom/plugins/poll/templates/poll.js
index f1b61144..b95b1368 100644
--- a/conversejs/custom/plugins/poll/templates/poll.js
+++ b/conversejs/custom/plugins/poll/templates/poll.js
@@ -63,7 +63,7 @@ function _tplChoice (el, currentPoll, choice, canVote) {
diff --git a/conversejs/custom/plugins/poll/utils.js b/conversejs/custom/plugins/poll/utils.js
index 9a4a3812..ecb4266d 100644
--- a/conversejs/custom/plugins/poll/utils.js
+++ b/conversejs/custom/plugins/poll/utils.js
@@ -3,7 +3,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { XMLNS_POLL } from './constants.js'
-import { _converse, api } from '../../../src/headless/core.js'
+import { _converse, api } from '../../../src/headless/index.js'
import { __ } from 'i18n'
export function getHeadingButtons (view, buttons) {
diff --git a/conversejs/custom/plugins/size/index.js b/conversejs/custom/plugins/size/index.js
index 7732002e..d02ce408 100644
--- a/conversejs/custom/plugins/size/index.js
+++ b/conversejs/custom/plugins/size/index.js
@@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0-only
-import { _converse, converse, api } from '../../../src/headless/core.js'
+import { _converse, converse, api } from '../../../src/headless/index.js'
/**
* This plugin computes the available width of converse-root, and adds classes
diff --git a/conversejs/custom/plugins/tasks/components/muc-task-app-view.js b/conversejs/custom/plugins/tasks/components/muc-task-app-view.js
index 155b75a2..32e3c7ce 100644
--- a/conversejs/custom/plugins/tasks/components/muc-task-app-view.js
+++ b/conversejs/custom/plugins/tasks/components/muc-task-app-view.js
@@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0-only
-import { api } from '@converse/headless/core'
+import { api } from '@converse/headless'
import { CustomElement } from 'shared/components/element.js'
import { tplMUCTaskApp } from '../templates/muc-task-app.js'
diff --git a/conversejs/custom/plugins/tasks/components/muc-task-list-view.js b/conversejs/custom/plugins/tasks/components/muc-task-list-view.js
index 3f97abfd..8688468c 100644
--- a/conversejs/custom/plugins/tasks/components/muc-task-list-view.js
+++ b/conversejs/custom/plugins/tasks/components/muc-task-list-view.js
@@ -3,7 +3,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { CustomElement } from 'shared/components/element.js'
-import { api } from '@converse/headless/core'
+import { api } from '@converse/headless'
import tplMucTaskList from '../templates/muc-task-list'
import { __ } from 'i18n'
diff --git a/conversejs/custom/plugins/tasks/components/muc-task-lists-view.js b/conversejs/custom/plugins/tasks/components/muc-task-lists-view.js
index c4429827..7c0df41c 100644
--- a/conversejs/custom/plugins/tasks/components/muc-task-lists-view.js
+++ b/conversejs/custom/plugins/tasks/components/muc-task-lists-view.js
@@ -3,7 +3,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { CustomElement } from 'shared/components/element.js'
-import { api } from '@converse/headless/core'
+import { api } from '@converse/headless'
import tplMucTaskLists from '../templates/muc-task-lists'
import { __ } from 'i18n'
diff --git a/conversejs/custom/plugins/tasks/components/muc-task-view.js b/conversejs/custom/plugins/tasks/components/muc-task-view.js
index 1d02af85..db7bfdda 100644
--- a/conversejs/custom/plugins/tasks/components/muc-task-view.js
+++ b/conversejs/custom/plugins/tasks/components/muc-task-view.js
@@ -3,7 +3,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { CustomElement } from 'shared/components/element.js'
-import { api } from '@converse/headless/core'
+import { api } from '@converse/headless'
import { tplMucTask } from '../templates/muc-task'
import { __ } from 'i18n'
diff --git a/conversejs/custom/plugins/tasks/index.js b/conversejs/custom/plugins/tasks/index.js
index 50b6afd7..37cfd1c3 100644
--- a/conversejs/custom/plugins/tasks/index.js
+++ b/conversejs/custom/plugins/tasks/index.js
@@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0-only
-import { _converse, converse } from '../../../src/headless/core.js'
+import { _converse, converse } from '../../../src/headless/index.js'
import { ChatRoomTaskLists } from './task-lists.js'
import { ChatRoomTaskList } from './task-list.js'
import { ChatRoomTasks } from './tasks.js'
diff --git a/conversejs/custom/plugins/tasks/modals/pick-task-list.js b/conversejs/custom/plugins/tasks/modals/pick-task-list.js
index 7258bd33..1c5e1701 100644
--- a/conversejs/custom/plugins/tasks/modals/pick-task-list.js
+++ b/conversejs/custom/plugins/tasks/modals/pick-task-list.js
@@ -4,7 +4,7 @@
import BaseModal from 'plugins/modal/modal.js'
import tplPickTaskList from './templates/pick-task-list.js'
-import { api } from '@converse/headless/core'
+import { api } from '@converse/headless'
import { __ } from 'i18n'
export default class PickTaskListModal extends BaseModal {
diff --git a/conversejs/custom/plugins/tasks/utils.js b/conversejs/custom/plugins/tasks/utils.js
index 8406412d..65700a5e 100644
--- a/conversejs/custom/plugins/tasks/utils.js
+++ b/conversejs/custom/plugins/tasks/utils.js
@@ -4,7 +4,7 @@
import { XMLNS_TASKLIST, XMLNS_TASK } from './constants.js'
import { PubSubManager } from '../../shared/lib/pubsub-manager.js'
-import { converse, _converse, api } from '../../../src/headless/core.js'
+import { converse, _converse, api } from '../../../src/headless/index.js'
import { __ } from 'i18n'
export function getHeadingButtons (view, buttons) {
diff --git a/conversejs/custom/plugins/terms/components/muc-terms.js b/conversejs/custom/plugins/terms/components/muc-terms.js
index ac57d74a..b133e64b 100644
--- a/conversejs/custom/plugins/terms/components/muc-terms.js
+++ b/conversejs/custom/plugins/terms/components/muc-terms.js
@@ -3,7 +3,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { CustomElement } from 'shared/components/element.js'
-import { api } from '@converse/headless/core'
+import { api } from '@converse/headless'
import { html } from 'lit'
import { __ } from 'i18n'
diff --git a/conversejs/custom/plugins/terms/index.js b/conversejs/custom/plugins/terms/index.js
index 8459cd82..95d25b61 100644
--- a/conversejs/custom/plugins/terms/index.js
+++ b/conversejs/custom/plugins/terms/index.js
@@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0-only
-import { converse, api } from '../../../src/headless/core.js'
+import { converse, api } from '../../../src/headless/index.js'
import './components/muc-terms.js'
const { sizzle } = converse.env
diff --git a/conversejs/custom/shared/lib/pubsub-manager.js b/conversejs/custom/shared/lib/pubsub-manager.js
index ceabf378..51a4e13b 100644
--- a/conversejs/custom/shared/lib/pubsub-manager.js
+++ b/conversejs/custom/shared/lib/pubsub-manager.js
@@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0-only
-import { converse, _converse, api } from '../../../src/headless/core.js'
+import { converse, _converse, api } from '../../../src/headless/index.js'
const { $build, Strophe, $iq, sizzle } = converse.env
/**
@@ -50,7 +50,7 @@ export class PubSubManager {
async start () {
// FIXME: handle errors. Find a way to display to user that this failed.
- this.stanzaHandler = _converse.connection.addHandler(
+ this.stanzaHandler = api.connection.get().addHandler(
(message) => {
try {
this._handleMessage(message)
@@ -79,7 +79,7 @@ export class PubSubManager {
// Note: no need to unsubscribe from the pubsub node, the backend will do when users leave the room.
if (this.stanzaHandler) {
- _converse.connection.deleteHandler(this.stanzaHandler)
+ api.connection.get().deleteHandler(this.stanzaHandler)
this.stanzaHandler = undefined
}
}
diff --git a/conversejs/custom/shared/modals/livechat-external-login.js b/conversejs/custom/shared/modals/livechat-external-login.js
index b0accf00..edbbfa30 100644
--- a/conversejs/custom/shared/modals/livechat-external-login.js
+++ b/conversejs/custom/shared/modals/livechat-external-login.js
@@ -4,7 +4,7 @@
import { __ } from 'i18n'
import BaseModal from 'plugins/modal/modal.js'
-import { api } from '@converse/headless/core'
+import { api } from '@converse/headless'
import { html } from 'lit'
import 'livechat-external-login-content.js'
diff --git a/conversejs/custom/templates/background_logo.js b/conversejs/custom/templates/background_logo.js
index 585de358..4548f2a5 100644
--- a/conversejs/custom/templates/background_logo.js
+++ b/conversejs/custom/templates/background_logo.js
@@ -5,7 +5,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { html } from 'lit'
-import { api } from '@converse/headless/core.js'
+import { api } from '@converse/headless/index.js'
export default () => html`
diff --git a/conversejs/custom/templates/livechat-external-login-modal.js b/conversejs/custom/templates/livechat-external-login-modal.js
index a8cbca95..52e33027 100644
--- a/conversejs/custom/templates/livechat-external-login-modal.js
+++ b/conversejs/custom/templates/livechat-external-login-modal.js
@@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0-only
-import { _converse, api } from '@converse/headless/core'
+import { _converse, api } from '@converse/headless'
import { __ } from 'i18n'
import { html } from 'lit'
diff --git a/conversejs/custom/templates/muc-bottom-panel.js b/conversejs/custom/templates/muc-bottom-panel.js
index cfac6d2c..cf70e064 100644
--- a/conversejs/custom/templates/muc-bottom-panel.js
+++ b/conversejs/custom/templates/muc-bottom-panel.js
@@ -3,7 +3,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { __ } from 'i18n'
-import { _converse, api } from '@converse/headless/core'
+import { _converse, api } from '@converse/headless'
import { html } from 'lit'
import tplMucBottomPanel from '../../src/plugins/muc-views/templates/muc-bottom-panel.js'
import { CustomElement } from 'shared/components/element.js'
diff --git a/conversejs/custom/templates/muc-chatarea.js b/conversejs/custom/templates/muc-chatarea.js
index 726e8fd5..d709ca56 100644
--- a/conversejs/custom/templates/muc-chatarea.js
+++ b/conversejs/custom/templates/muc-chatarea.js
@@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0-only
-import { api } from '@converse/headless/core'
+import { api } from '@converse/headless'
import tplMUCChatarea from '../../src/plugins/muc-views/templates/muc-chatarea.js'
import { html } from 'lit'
diff --git a/conversejs/custom/templates/muc-head.js b/conversejs/custom/templates/muc-head.js
index d926ed32..ebd1ef7a 100644
--- a/conversejs/custom/templates/muc-head.js
+++ b/conversejs/custom/templates/muc-head.js
@@ -3,7 +3,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { html } from 'lit'
-import { api } from '@converse/headless/core'
+import { api } from '@converse/headless'
import { until } from 'lit/directives/until.js'
import { repeat } from 'lit/directives/repeat.js'
import { unsafeHTML } from 'lit/directives/unsafe-html.js'
diff --git a/conversejs/lib/converse-params.ts b/conversejs/lib/converse-params.ts
index e7ef1c06..43040524 100644
--- a/conversejs/lib/converse-params.ts
+++ b/conversejs/lib/converse-params.ts
@@ -97,6 +97,7 @@ function defaultConverseParams (
pruning_behavior: 'unscrolled',
colorize_username: true,
send_chat_markers: [],
+ reuse_scram_keys: false, // for now we don't use this.
// This is a specific settings, that is used in ConverseJS customization, to force avatars loading in readonly mode.
livechat_load_all_vcards: !!forceReadonly,
diff --git a/conversejs/lib/plugins/livechat-specific.ts b/conversejs/lib/plugins/livechat-specific.ts
index 6c7fdf43..a5e4dbf1 100644
--- a/conversejs/lib/plugins/livechat-specific.ts
+++ b/conversejs/lib/plugins/livechat-specific.ts
@@ -114,6 +114,11 @@ 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: {