aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_pubsub/pubsub.lib.lua8
-rw-r--r--spec/scansion/pubsub_advanced.scs6
2 files changed, 12 insertions, 2 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
diff --git a/spec/scansion/pubsub_advanced.scs b/spec/scansion/pubsub_advanced.scs
index c873486e..86410677 100644
--- a/spec/scansion/pubsub_advanced.scs
+++ b/spec/scansion/pubsub_advanced.scs
@@ -150,7 +150,11 @@ Juliet sends:
</iq>
Juliet receives:
- <iq type="result" id='unsub1'/>
+ <iq type="result" id='unsub1'>
+ <pubsub xmlns='http://jabber.org/protocol/pubsub'>
+ <subscription jid="${Juliet's full JID}" node='princely_musings' subscription='none'/>
+ </pubsub>
+ </iq>
Balthasar sends:
<iq type="set" to="pubsub.localhost" id='del1'>