From e5ad7816b684484be3cb89bfce1bde16c805e871 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Mon, 13 May 2024 12:31:28 +0200 Subject: [PATCH] Cleaning FIXME and TODO --- conversejs/custom/plugins/tasks/index.js | 10 +++++----- conversejs/custom/plugins/tasks/utils.js | 1 - conversejs/custom/shared/lib/pubsub-manager.js | 3 ++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/conversejs/custom/plugins/tasks/index.js b/conversejs/custom/plugins/tasks/index.js index 86fe7526..abb5d763 100644 --- a/conversejs/custom/plugins/tasks/index.js +++ b/conversejs/custom/plugins/tasks/index.js @@ -4,11 +4,11 @@ import { ChatRoomTaskList } from './task-list.js' import { ChatRoomTasks } from './tasks.js' import { getHeadingButtons, getMessageActionButtons, initOrDestroyChatRoomTaskLists } from './utils.js' import { XMLNS_TASK, XMLNS_TASKLIST } from './constants.js' -import './components/muc-task-view.js' // FIXME: here or in another file? -import './components/muc-task-list-view.js' // FIXME: here or in another file? -import './components/muc-task-lists-view.js' // FIXME: here or in another file? -import './components/muc-task-app-view.js' // FIXME: here or in another file? -import './modals/pick-task-list.js' // FIXME: here or in another file? +import './components/muc-task-view.js' +import './components/muc-task-list-view.js' +import './components/muc-task-lists-view.js' +import './components/muc-task-app-view.js' +import './modals/pick-task-list.js' converse.plugins.add('livechat-converse-tasks', { dependencies: ['converse-muc', 'converse-disco', 'converse-pubsub'], diff --git a/conversejs/custom/plugins/tasks/utils.js b/conversejs/custom/plugins/tasks/utils.js index 216547f3..19b26361 100644 --- a/conversejs/custom/plugins/tasks/utils.js +++ b/conversejs/custom/plugins/tasks/utils.js @@ -114,7 +114,6 @@ function _destroyChatRoomTaskLists (mucModel) { mucModel.taskManager.stop().catch(err => console.log(err)) mucModel.taskManager = undefined - // mucModel.tasklists.unload() FIXME: add a method to unregister from the pubsub, and empty the tasklist. mucModel.tasklists = undefined mucModel.tasks = undefined diff --git a/conversejs/custom/shared/lib/pubsub-manager.js b/conversejs/custom/shared/lib/pubsub-manager.js index 5647f83c..f7f5f58a 100644 --- a/conversejs/custom/shared/lib/pubsub-manager.js +++ b/conversejs/custom/shared/lib/pubsub-manager.js @@ -72,7 +72,7 @@ export class PubSubManager { * Stops the manager */ async stop () { - // await this._unsubscribe() TODO + // 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) @@ -203,6 +203,7 @@ export class PubSubManager { * * TODO: handle pagination if results are not all sent. * See https://xmpp.org/extensions/xep-0060.html#subscriber-retrieve-returnsome + * (seems Prosody does not handle pagination for now) */ async _retrieveAllItems () { // Requesting all items.