diff options
author | Kim Alvefur <zash@zash.se> | 2021-03-15 19:04:08 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-03-15 19:04:08 +0100 |
commit | 90e4a09661c9f91fc57faf5f150656add797b5d4 (patch) | |
tree | eb311efc5be49a567b80a90ce6ca61a4faf6aa2c /plugins/mod_pubsub | |
parent | 6bae44fea856e81ec6ce597628586c168cc4b2b8 (diff) | |
download | prosody-90e4a09661c9f91fc57faf5f150656add797b5d4.tar.gz prosody-90e4a09661c9f91fc57faf5f150656add797b5d4.zip |
mod_pubsub: Include <pubsub> with unsubscribe reply
XEP-0060 6.2.2
This is a MAY but it makes it nice and symmetric with the subscription
response. Reduces the need to remember which node you unsubscribed from.
Explicit > implicit etc.
Diffstat (limited to 'plugins/mod_pubsub')
-rw-r--r-- | plugins/mod_pubsub/pubsub.lib.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua index c84208a2..b53e0689 100644 --- a/plugins/mod_pubsub/pubsub.lib.lua +++ b/plugins/mod_pubsub/pubsub.lib.lua @@ -517,7 +517,13 @@ function handlers.set_unsubscribe(origin, stanza, unsubscribe, service) local ok, ret = service:remove_subscription(node, stanza.attr.from, jid); local reply; if ok then - reply = st.reply(stanza); + reply = st.reply(stanza) + :tag("pubsub", { xmlns = xmlns_pubsub }) + :tag("subscription", { + node = node, + jid = jid, + subscription = "none" + }):up(); else reply = pubsub_error_reply(stanza, ret); end |