Skip to content

Add utilities for XEP-0115 and XEP-0390#287

Open
chrzaszcz wants to merge 4 commits intomasterfrom
caps-v2
Open

Add utilities for XEP-0115 and XEP-0390#287
chrzaszcz wants to merge 4 commits intomasterfrom
caps-v2

Conversation

@chrzaszcz
Copy link
Member

@chrzaszcz chrzaszcz commented Mar 13, 2026

This PR is used in esl/MongooseIM#4666.

Details in commit messages.

Dropping Erlang/OTP 26 as we support 2 most recent versions in MongooseIM - so we can do it here as well to use the latest Erlang syntax additions.

Facilitate:
  - construction of 'c' elements with capabilities
  - generating the 'node' for disco#info queries from the 'c' elements
This way, the client can process both the caps from XEP-0115 and
XEP-0390 as well as handle special cases.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds stanza-building and parsing utilities to support XEP-0115 (Entity Capabilities v1) and XEP-0390 (Entity Capabilities 2.0), plus small Service Discovery helpers, while updating CI to stop testing on OTP 26.

Changes:

  • Add feature/1, identity/3,4 helpers for XEP-0030 disco payload construction.
  • Add caps/3, caps_to_node/1, ns_caps/1 utilities for XEP-0115/XEP-0390 and update namespace macros accordingly.
  • Adjust stream feature parsing for server capabilities and drop OTP 26 from CI matrix.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/escalus_stanza.erl Adds new stanza constructors for disco features/identities and entity capabilities (v1/v2) plus helpers to derive a caps “node”.
src/escalus_session.erl Changes how server caps are extracted from stream features (now returns <c/> elements list).
include/escalus_xmlns.hrl Introduces namespaces for XEP-0300 hashes and XEP-0390 caps.
.github/workflows/ci.yml Removes OTP 26 from the CI test matrix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chrzaszcz chrzaszcz marked this pull request as ready for review March 13, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants