# HG changeset patch # User Kim Alvefur # Date 1615831448 -3600 # Node ID ef623d7198943ed93d804beaf1418229fac0a0b8 # Parent d91def9fcfdd6f68bde4262c119932797b1b96c5 mod_pubsub: Include 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. diff -r d91def9fcfdd -r ef623d719894 plugins/mod_pubsub/pubsub.lib.lua --- a/plugins/mod_pubsub/pubsub.lib.lua Sat Mar 06 18:26:50 2021 +0100 +++ b/plugins/mod_pubsub/pubsub.lib.lua Mon Mar 15 19:04:08 2021 +0100 @@ -517,7 +517,13 @@ 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 diff -r d91def9fcfdd -r ef623d719894 spec/scansion/pubsub_advanced.scs --- a/spec/scansion/pubsub_advanced.scs Sat Mar 06 18:26:50 2021 +0100 +++ b/spec/scansion/pubsub_advanced.scs Mon Mar 15 19:04:08 2021 +0100 @@ -150,7 +150,11 @@ Juliet receives: - + + + + + Balthasar sends: