#1963 Remove undocumented optional child in sm stream:feature

Reporter Link Mauve
Owner Nobody
Created
Updated
Stars ★ (1)
Tags
  • Type-Defect
  • Status-Fixed
  • Priority-Medium
  • Compliance
  • Milestone-13.0
  • Patch
  1. Link Mauve on

    Please provide a snippet of the part of the specification which we violate if possible: This element was never specified, it was present in the XML Schema but that has been removed in version 1.6.3. This caused issues with xmpp-parsers, causing us to have to implement support for this unspecified element: https://gitlab.com/xmpp-rs/xmpp-rs/-/merge_requests/603 Please provide a link to the specification: https://xmpp.org/extensions/xep-0198.html#revision-history-v1.6.3 And a patch: ``` # HG changeset patch # User Link Mauve <linkmauve@linkmauve.fr> # Date 1756767025 -7200 # Tue Sep 02 00:50:25 2025 +0200 # Node ID 2240f69323c9e816c457a1bd091d737ec67dc8d2 # Parent bf5c2dc0a9556d2ff6a673ec496fba8338f1da71 mod_smacks: Remove extra optional from sm element Since XEP-0198 version 1.6.3, the optional and required children of sm in stream:features have been removed entirely. They already weren’t specified before, and were only leftover from a very old version in the XML Schema. diff --git a/doc/doap.xml b/doc/doap.xml --- a/doc/doap.xml +++ b/doc/doap.xml @@ -518,7 +518,7 @@ <implements> <xmpp:SupportedXep> <xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0198.html"/> - <xmpp:version>1.6.2</xmpp:version> + <xmpp:version>1.6.3</xmpp:version> <xmpp:status>complete</xmpp:status> <xmpp:since>0.12.0</xmpp:since> <xmpp:note>mod_smacks</xmpp:note> diff --git a/plugins/mod_smacks.lua b/plugins/mod_smacks.lua --- a/plugins/mod_smacks.lua +++ b/plugins/mod_smacks.lua @@ -152,16 +152,16 @@ end module:hook("stream-features", function (event) if can_do_smacks(event.origin, true) then - event.features:tag("sm", sm2_attr):tag("optional"):up():up(); - event.features:tag("sm", sm3_attr):tag("optional"):up():up(); + event.features:tag("sm", sm2_attr):up(); + event.features:tag("sm", sm3_attr):up(); end end); module:hook("s2s-stream-features", function (event) if can_do_smacks(event.origin, true) then - event.features:tag("sm", sm2_attr):tag("optional"):up():up(); - event.features:tag("sm", sm3_attr):tag("optional"):up():up(); + event.features:tag("sm", sm2_attr):up(); + event.features:tag("sm", sm3_attr):up(); end end); ```

  2. Zash on

    Thanks, merged as https://hg.prosody.im/trunk/rev/5f8a9e50c2fb

    Changes
    • tags Milestone-13.0 Patch Status-Fixed

New comment

Not published. Used for spam prevention and optional update notifications.