Software /
code /
prosody
Comparison
plugins/mod_pubsub/pubsub.lib.lua @ 10276:4e4ce7400b39
mod_pubsub: Remove the unwanted check for @notify on <purge/>.
This most likely was copied from the handling of <retract/>, where it actually
is required by the spec (XEP-0060 §7.2.2.1), but this attribute doesn’t exist
for purge.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 28 Sep 2019 20:00:39 +0200 |
parent | 10090:cdcf26331b9f |
child | 10356:0a2d7efca039 |
comparison
equal
deleted
inserted
replaced
10275:a247fa8df7df | 10276:4e4ce7400b39 |
---|---|
636 origin.send(reply); | 636 origin.send(reply); |
637 return true; | 637 return true; |
638 end | 638 end |
639 | 639 |
640 function handlers.owner_set_purge(origin, stanza, purge, service) | 640 function handlers.owner_set_purge(origin, stanza, purge, service) |
641 local node, notify = purge.attr.node, purge.attr.notify; | 641 local node = purge.attr.node; |
642 notify = (notify == "1") or (notify == "true"); | |
643 local reply; | 642 local reply; |
644 if not node then | 643 if not node then |
645 origin.send(pubsub_error_reply(stanza, "nodeid-required")); | 644 origin.send(pubsub_error_reply(stanza, "nodeid-required")); |
646 return true; | 645 return true; |
647 end | 646 end |
648 local ok, ret = service:purge(node, stanza.attr.from, notify); | 647 local ok, ret = service:purge(node, stanza.attr.from, true); |
649 if ok then | 648 if ok then |
650 reply = st.reply(stanza); | 649 reply = st.reply(stanza); |
651 else | 650 else |
652 reply = pubsub_error_reply(stanza, ret); | 651 reply = pubsub_error_reply(stanza, ret); |
653 end | 652 end |