Switch from Converse v10.1.6 to upstream (unreleased v11):
* various WIP to change the Converse version
This commit is contained in:
parent
9679aec739
commit
51b603c894
@ -15,10 +15,10 @@ set -x
|
|||||||
|
|
||||||
# Set CONVERSE_VERSION and CONVERSE_REPO to select which repo and tag/commit/branch use.
|
# Set CONVERSE_VERSION and CONVERSE_REPO to select which repo and tag/commit/branch use.
|
||||||
# Defaults values:
|
# Defaults values:
|
||||||
CONVERSE_VERSION="v10.1.6"
|
CONVERSE_VERSION="v11.0.0"
|
||||||
CONVERSE_REPO="https://github.com/conversejs/converse.js.git"
|
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.
|
# 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.
|
# 2014-01-16: we are using a custom version, to wait for some PR to be apply upstream.
|
||||||
# This version includes following changes:
|
# 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 config option [colorize_username](https://conversejs.org/docs/html/configuration.html#colorize_username)
|
||||||
# - New loadEmojis hook, to customize emojis at runtime.
|
# - New loadEmojis hook, to customize emojis at runtime.
|
||||||
# - Fix custom emojis path when assets_path is not the default path.
|
# - Fix custom emojis path when assets_path is not the default path.
|
||||||
CONVERSE_VERSION="livechat-10.1.0"
|
# CONVERSE_VERSION="livechat-10.1.0"
|
||||||
# CONVERSE_COMMIT="4402fcc3fc60f6c9334f86528c33a0b463371d12"
|
# # CONVERSE_COMMIT="4402fcc3fc60f6c9334f86528c33a0b463371d12"
|
||||||
CONVERSE_REPO="https://github.com/JohnXLivingston/converse.js"
|
# CONVERSE_REPO="https://github.com/JohnXLivingston/converse.js"
|
||||||
|
|
||||||
rootdir="$(pwd)"
|
rootdir="$(pwd)"
|
||||||
src_dir="$rootdir/conversejs"
|
src_dir="$rootdir/conversejs"
|
||||||
|
@ -13,7 +13,7 @@ import './i18n/index.js'
|
|||||||
import 'shared/registry.js'
|
import 'shared/registry.js'
|
||||||
import { CustomElement } from 'shared/components/element'
|
import { CustomElement } from 'shared/components/element'
|
||||||
import { VIEW_PLUGINS } from './shared/constants.js'
|
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'
|
import 'shared/styles/index.scss'
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// 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 { CustomElement } from 'shared/components/element.js'
|
||||||
import { tplExternalLoginModal } from 'templates/livechat-external-login-modal.js'
|
import { tplExternalLoginModal } from 'templates/livechat-external-login-modal.js'
|
||||||
import { __ } from 'i18n'
|
import { __ } from 'i18n'
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
import { XMLNS_POLL } from '../constants.js'
|
import { XMLNS_POLL } from '../constants.js'
|
||||||
import { tplPollForm } from '../templates/poll-form.js'
|
import { tplPollForm } from '../templates/poll-form.js'
|
||||||
import { CustomElement } from 'shared/components/element.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 { webForm2xForm } from '@converse/headless/utils/form'
|
||||||
import { __ } from 'i18n'
|
import { __ } from 'i18n'
|
||||||
import '../styles/poll-form.scss'
|
import '../styles/poll-form.scss'
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import { tplPoll } from '../templates/poll.js'
|
import { tplPoll } from '../templates/poll.js'
|
||||||
import { CustomElement } from 'shared/components/element.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'
|
import '../styles/poll.scss'
|
||||||
|
|
||||||
export default class MUCPollView extends CustomElement {
|
export default class MUCPollView extends CustomElement {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// 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 { getHeadingButtons } from './utils.js'
|
||||||
import { POLL_MESSAGE_TAG, POLL_QUESTION_TAG, POLL_CHOICE_TAG } from './constants.js'
|
import { POLL_MESSAGE_TAG, POLL_QUESTION_TAG, POLL_CHOICE_TAG } from './constants.js'
|
||||||
import { __ } from 'i18n'
|
import { __ } from 'i18n'
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import { __ } from 'i18n'
|
import { __ } from 'i18n'
|
||||||
import BaseModal from 'plugins/modal/modal.js'
|
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 { modal_close_button as ModalCloseButton } from 'plugins/modal/templates/buttons.js'
|
||||||
import { html } from 'lit'
|
import { html } from 'lit'
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ function _tplChoice (el, currentPoll, choice, canVote) {
|
|||||||
<div class="livechat-progress-bar">
|
<div class="livechat-progress-bar">
|
||||||
<div
|
<div
|
||||||
role="progressbar"
|
role="progressbar"
|
||||||
style="width: ${percent}%;"
|
style=${'width: ' + percent + '%;'}
|
||||||
aria-valuenow="${percent}" aria-valuemin="0" aria-valuemax="100"
|
aria-valuenow="${percent}" aria-valuemin="0" aria-valuemax="100"
|
||||||
></div>
|
></div>
|
||||||
<p>
|
<p>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
import { XMLNS_POLL } from './constants.js'
|
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'
|
import { __ } from 'i18n'
|
||||||
|
|
||||||
export function getHeadingButtons (view, buttons) {
|
export function getHeadingButtons (view, buttons) {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// 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
|
* This plugin computes the available width of converse-root, and adds classes
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// 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 { CustomElement } from 'shared/components/element.js'
|
||||||
import { tplMUCTaskApp } from '../templates/muc-task-app.js'
|
import { tplMUCTaskApp } from '../templates/muc-task-app.js'
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
import { CustomElement } from 'shared/components/element.js'
|
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 tplMucTaskList from '../templates/muc-task-list'
|
||||||
import { __ } from 'i18n'
|
import { __ } from 'i18n'
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
import { CustomElement } from 'shared/components/element.js'
|
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 tplMucTaskLists from '../templates/muc-task-lists'
|
||||||
import { __ } from 'i18n'
|
import { __ } from 'i18n'
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
import { CustomElement } from 'shared/components/element.js'
|
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 { tplMucTask } from '../templates/muc-task'
|
||||||
import { __ } from 'i18n'
|
import { __ } from 'i18n'
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// 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 { ChatRoomTaskLists } from './task-lists.js'
|
||||||
import { ChatRoomTaskList } from './task-list.js'
|
import { ChatRoomTaskList } from './task-list.js'
|
||||||
import { ChatRoomTasks } from './tasks.js'
|
import { ChatRoomTasks } from './tasks.js'
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import BaseModal from 'plugins/modal/modal.js'
|
import BaseModal from 'plugins/modal/modal.js'
|
||||||
import tplPickTaskList from './templates/pick-task-list.js'
|
import tplPickTaskList from './templates/pick-task-list.js'
|
||||||
import { api } from '@converse/headless/core'
|
import { api } from '@converse/headless'
|
||||||
import { __ } from 'i18n'
|
import { __ } from 'i18n'
|
||||||
|
|
||||||
export default class PickTaskListModal extends BaseModal {
|
export default class PickTaskListModal extends BaseModal {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import { XMLNS_TASKLIST, XMLNS_TASK } from './constants.js'
|
import { XMLNS_TASKLIST, XMLNS_TASK } from './constants.js'
|
||||||
import { PubSubManager } from '../../shared/lib/pubsub-manager.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'
|
import { __ } from 'i18n'
|
||||||
|
|
||||||
export function getHeadingButtons (view, buttons) {
|
export function getHeadingButtons (view, buttons) {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
import { CustomElement } from 'shared/components/element.js'
|
import { CustomElement } from 'shared/components/element.js'
|
||||||
import { api } from '@converse/headless/core'
|
import { api } from '@converse/headless'
|
||||||
import { html } from 'lit'
|
import { html } from 'lit'
|
||||||
import { __ } from 'i18n'
|
import { __ } from 'i18n'
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// 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'
|
import './components/muc-terms.js'
|
||||||
|
|
||||||
const { sizzle } = converse.env
|
const { sizzle } = converse.env
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// 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
|
const { $build, Strophe, $iq, sizzle } = converse.env
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -50,7 +50,7 @@ export class PubSubManager {
|
|||||||
async start () {
|
async start () {
|
||||||
// FIXME: handle errors. Find a way to display to user that this failed.
|
// 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) => {
|
(message) => {
|
||||||
try {
|
try {
|
||||||
this._handleMessage(message)
|
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.
|
// Note: no need to unsubscribe from the pubsub node, the backend will do when users leave the room.
|
||||||
|
|
||||||
if (this.stanzaHandler) {
|
if (this.stanzaHandler) {
|
||||||
_converse.connection.deleteHandler(this.stanzaHandler)
|
api.connection.get().deleteHandler(this.stanzaHandler)
|
||||||
this.stanzaHandler = undefined
|
this.stanzaHandler = undefined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import { __ } from 'i18n'
|
import { __ } from 'i18n'
|
||||||
import BaseModal from 'plugins/modal/modal.js'
|
import BaseModal from 'plugins/modal/modal.js'
|
||||||
import { api } from '@converse/headless/core'
|
import { api } from '@converse/headless'
|
||||||
import { html } from 'lit'
|
import { html } from 'lit'
|
||||||
import 'livechat-external-login-content.js'
|
import 'livechat-external-login-content.js'
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
import { html } from 'lit'
|
import { html } from 'lit'
|
||||||
import { api } from '@converse/headless/core.js'
|
import { api } from '@converse/headless/index.js'
|
||||||
|
|
||||||
export default () => html`
|
export default () => html`
|
||||||
<div class="inner-content converse-brand row">
|
<div class="inner-content converse-brand row">
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
import { _converse, api } from '@converse/headless/core'
|
import { _converse, api } from '@converse/headless'
|
||||||
import { __ } from 'i18n'
|
import { __ } from 'i18n'
|
||||||
import { html } from 'lit'
|
import { html } from 'lit'
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
import { __ } from 'i18n'
|
import { __ } from 'i18n'
|
||||||
import { _converse, api } from '@converse/headless/core'
|
import { _converse, api } from '@converse/headless'
|
||||||
import { html } from 'lit'
|
import { html } from 'lit'
|
||||||
import tplMucBottomPanel from '../../src/plugins/muc-views/templates/muc-bottom-panel.js'
|
import tplMucBottomPanel from '../../src/plugins/muc-views/templates/muc-bottom-panel.js'
|
||||||
import { CustomElement } from 'shared/components/element.js'
|
import { CustomElement } from 'shared/components/element.js'
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// 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 tplMUCChatarea from '../../src/plugins/muc-views/templates/muc-chatarea.js'
|
||||||
import { html } from 'lit'
|
import { html } from 'lit'
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
import { html } from 'lit'
|
import { html } from 'lit'
|
||||||
import { api } from '@converse/headless/core'
|
import { api } from '@converse/headless'
|
||||||
import { until } from 'lit/directives/until.js'
|
import { until } from 'lit/directives/until.js'
|
||||||
import { repeat } from 'lit/directives/repeat.js'
|
import { repeat } from 'lit/directives/repeat.js'
|
||||||
import { unsafeHTML } from 'lit/directives/unsafe-html.js'
|
import { unsafeHTML } from 'lit/directives/unsafe-html.js'
|
||||||
|
@ -97,6 +97,7 @@ function defaultConverseParams (
|
|||||||
pruning_behavior: 'unscrolled',
|
pruning_behavior: 'unscrolled',
|
||||||
colorize_username: true,
|
colorize_username: true,
|
||||||
send_chat_markers: [],
|
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.
|
// This is a specific settings, that is used in ConverseJS customization, to force avatars loading in readonly mode.
|
||||||
livechat_load_all_vcards: !!forceReadonly,
|
livechat_load_all_vcards: !!forceReadonly,
|
||||||
|
@ -114,6 +114,11 @@ export const livechatSpecificsPlugin = {
|
|||||||
// We are probably on a dev instance, so we will add _converse in window:
|
// We are probably on a dev instance, so we will add _converse in window:
|
||||||
(window as any)._livechatConverse = _converse
|
(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: {
|
overrides: {
|
||||||
ChatRoom: {
|
ChatRoom: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user