Mercurial > prosody-hg
comparison plugins/mod_smacks.lua @ 13940:5f8a9e50c2fb 13.0
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.
Fixes #1963
| author | Link Mauve <linkmauve@linkmauve.fr> |
|---|---|
| date | Tue, 02 Sep 2025 00:50:25 +0200 |
| parents | 5d8fc1c4eb7c |
| children | 1d028f9473c2 |
comparison
equal
deleted
inserted
replaced
| 13933:dae094b392d1 | 13940:5f8a9e50c2fb |
|---|---|
| 150 end | 150 end |
| 151 | 151 |
| 152 module:hook("stream-features", | 152 module:hook("stream-features", |
| 153 function (event) | 153 function (event) |
| 154 if can_do_smacks(event.origin, true) then | 154 if can_do_smacks(event.origin, true) then |
| 155 event.features:tag("sm", sm2_attr):tag("optional"):up():up(); | 155 event.features:tag("sm", sm2_attr):up(); |
| 156 event.features:tag("sm", sm3_attr):tag("optional"):up():up(); | 156 event.features:tag("sm", sm3_attr):up(); |
| 157 end | 157 end |
| 158 end); | 158 end); |
| 159 | 159 |
| 160 module:hook("s2s-stream-features", | 160 module:hook("s2s-stream-features", |
| 161 function (event) | 161 function (event) |
| 162 if can_do_smacks(event.origin, true) then | 162 if can_do_smacks(event.origin, true) then |
| 163 event.features:tag("sm", sm2_attr):tag("optional"):up():up(); | 163 event.features:tag("sm", sm2_attr):up(); |
| 164 event.features:tag("sm", sm3_attr):tag("optional"):up():up(); | 164 event.features:tag("sm", sm3_attr):up(); |
| 165 end | 165 end |
| 166 end); | 166 end); |
| 167 | 167 |
| 168 local function should_ack(session, force) | 168 local function should_ack(session, force) |
| 169 if not session then return end -- shouldn't be possible | 169 if not session then return end -- shouldn't be possible |
