-
Notifications
You must be signed in to change notification settings - Fork 43
Add XMPP MUC room info query feature #916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new XMPP MUC room information query feature that enables clients to discover room capabilities and metadata using XMPP service discovery (disco#info) queries. This implements XEP-0045 MUC specification for querying room features and identity information.
- Adds a new
room-infoverb to the XMPP platform with proper schema validation - Implements service discovery queries using disco#info to retrieve room information
- Processes disco#info responses to extract room features and identity metadata
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/schemas/src/helpers/objects.ts | Adds schema definition for room-info object with features array and identity structure |
| packages/platform-xmpp/src/schema.js | Adds "room-info" to allowed message types for XMPP platform |
| packages/platform-xmpp/src/index.js | Implements roomInfo method that sends disco#info queries with unique IDs |
| packages/platform-xmpp/src/incoming-handlers.js | Adds notifyRoomInfo handler for processing disco#info responses and converting to ActivityStream format |
| packages/platform-xmpp/src/index.test.js | Adds test coverage for roomInfo method including XML generation and parameter validation |
| packages/platform-xmpp/src/incoming-handlers.test.data.js | Adds test data with realistic XMPP disco#info response XML and expected ActivityStream output |
2bdecff to
ac72596
Compare
Implements service discovery (disco#info) to query room information and features. Resolves #540. 🎉 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Co-authored-by: Copilot <[email protected]>
- Add room-info to XMPP platform README verb list - Regenerate API documentation with room-info examples - Fix validation test data to include room-info in schema error message 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
ac72596 to
6074ec4
Compare
Problem
This pull request resolves GitHub issue #540 by implementing a new XMPP MUC (Multi-User Chat) room information query feature. Previously, Sockethub's XMPP platform lacked the ability to query room information and features using XMPP service discovery (disco#info), which is essential for clients to understand what capabilities a room supports.
Solution
Added a new
room-infoverb to the XMPP platform that implements:room-infotype that follows the platform's activity stream patternsTechnical Changes
Core Implementation
packages/platform-xmpp/src/index.js: AddedroomInfo(job, done)method that sends disco#info queries with unique IDspackages/platform-xmpp/src/incoming-handlers.js: AddednotifyRoomInfo(stanza)handler for processing disco#info responsespackages/platform-xmpp/src/schema.js: Added "room-info" to allowed message typesSchema & Validation
packages/schemas/src/helpers/objects.ts: Added complete room-info object schema with features array and identity object validationTesting
packages/platform-xmpp/src/incoming-handlers.test.data.js: Added realistic test data with XMPP disco#info response XML and expected ActivityStream outputpackages/platform-xmpp/src/index.test.js: Added comprehensive test coverage for the roomInfo methodUsage Example
Request:
Response:
Testing
All 49 tests pass, including new tests specifically for:
🤖 Generated with Claude Code