From d16bdd9a87021dcdc6e54371f54c0a75ae2e0802 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Mon, 6 May 2024 10:43:42 +0200 Subject: [PATCH] Task lists WIP: * fix retractation --- conversejs/custom/shared/lib/pubsub-manager.js | 4 ++-- .../mod_pubsub_peertubelivechat.lua | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/conversejs/custom/shared/lib/pubsub-manager.js b/conversejs/custom/shared/lib/pubsub-manager.js index 25aec999..f6e969b8 100644 --- a/conversejs/custom/shared/lib/pubsub-manager.js +++ b/conversejs/custom/shared/lib/pubsub-manager.js @@ -128,7 +128,7 @@ export class PubSubManager { type: 'set', to: this.roomJID }).c('pubsub', { xmlns: Strophe.NS.PUBSUB }) - .c('retract', { node: this.node }) + .c('retract', { node: this.node, notify: '1' }) .c('item', { id }) await api.sendIQ(stanza) @@ -258,7 +258,7 @@ export class PubSubManager { */ _handleRetractations (stanza) { // Note: here we don't know the object type. We must try on each collection. - const ids = sizzle('', stanza).map(i => i.getAttribute('id')) + const ids = sizzle('retract', stanza).map(i => i.getAttribute('id')) for (const id of ids) { for (const key in this.types) { const type = this.types[key] diff --git a/prosody-modules/mod_pubsub_peertubelivechat/mod_pubsub_peertubelivechat.lua b/prosody-modules/mod_pubsub_peertubelivechat/mod_pubsub_peertubelivechat.lua index 0e520db4..e3a7c02a 100644 --- a/prosody-modules/mod_pubsub_peertubelivechat/mod_pubsub_peertubelivechat.lua +++ b/prosody-modules/mod_pubsub_peertubelivechat/mod_pubsub_peertubelivechat.lua @@ -132,6 +132,8 @@ end local function get_broadcaster(room_jid, room_host) local function simple_broadcast(kind, node, jids, item, _, node_obj) + -- module:log("debug", "simple_broadcast call, kind=%q, from %s for node %s", kind, room_jid, node); + if node_obj then if node_obj.config["notify_"..kind] == false then return;