From 3f00acb943e8801c13a8554e6ea9166a6c6d97b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Thu, 9 Jul 2026 13:18:30 +0200 Subject: [PATCH 1/2] Remove XMPP attendance query on join It never actually worked. Channel presence is received automatically and asynchronously when joining a channel (i.e. announcing one's presence to a channel). Explicit attendance queries only work for admins, and aren't meant for normal users. They can be used e.g. for admin dashboards and moderation tools. --- app/services/sockethub-xmpp.js | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/app/services/sockethub-xmpp.js b/app/services/sockethub-xmpp.js index c07792cf..1550485d 100644 --- a/app/services/sockethub-xmpp.js +++ b/app/services/sockethub-xmpp.js @@ -117,7 +117,6 @@ export default class SockethubXmppService extends Service { const channelId = message.target.id.split('/')[0]; const channel = this.coms.channels.find(ch => ch.sockethubChannelId === channelId); if (channel) { - this.queryAttendance(channel); this.queryRoomInfo(channel); } else { console.warn('Could not find channel for join message', message); @@ -187,8 +186,8 @@ export default class SockethubXmppService extends Service { } } } else { - this.log('xmpp', 'Presence update:', message.actor.id, message.object.presence, message.object.status); } + this.log('xmpp', 'Presence update:', message.actor.id, message.object.presence, message.object.status); } /** @@ -227,28 +226,6 @@ export default class SockethubXmppService extends Service { } } - /** - * Ask for a channel's attendance list (users currently joined) - * - * @param {Channel} channel - * @public - */ - queryAttendance (channel) { - let msg = this.buildActivityObject(channel.account, { - type: 'query', - target: { - id: channel.sockethubChannelId, - type: 'room' - }, - object: { - type: 'attendance' - } - }); - - this.log('xmpp', 'asking for attendance list', msg); - this.sockethubClient.socket.emit('message', msg); - } - /** * Ask for a channel's room info using service discovery * From 93ce49fce95cade144fde725fd9a44a2dde1bb3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Thu, 9 Jul 2026 13:25:19 +0200 Subject: [PATCH 2/2] Fix lint error --- app/services/sockethub-xmpp.js | 1 - 1 file changed, 1 deletion(-) diff --git a/app/services/sockethub-xmpp.js b/app/services/sockethub-xmpp.js index 1550485d..ddfa7fb8 100644 --- a/app/services/sockethub-xmpp.js +++ b/app/services/sockethub-xmpp.js @@ -185,7 +185,6 @@ export default class SockethubXmppService extends Service { channel.addUser(username); } } - } else { } this.log('xmpp', 'Presence update:', message.actor.id, message.object.presence, message.object.status); }