diff options
author | Kim Alvefur <zash@zash.se> | 2018-08-16 14:32:21 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-08-16 14:32:21 +0200 |
commit | d4dd6144b08a3304ab95dc8df64434dcb31a13e9 (patch) | |
tree | ae0edbc4facdcd6150d87ce35800e68ded54b145 /plugins/mod_pep.lua | |
parent | 3081a87880dfc7299f9e18de69403e2dff9e83cb (diff) | |
download | prosody-d4dd6144b08a3304ab95dc8df64434dcb31a13e9.tar.gz prosody-d4dd6144b08a3304ab95dc8df64434dcb31a13e9.zip |
util.pubsub: Pass "retract" as the type of such broadcasts
This moves some XEP-0060 awkwardness out of util.pubsub and into mod_pubsub
A retraction is broadcast in an <items> container, whereas most other
kinds of broadcasts are in a container with a name matching the 'kind'
attribute.
Diffstat (limited to 'plugins/mod_pep.lua')
-rw-r--r-- | plugins/mod_pep.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua index 4239ce66..777783da 100644 --- a/plugins/mod_pep.lua +++ b/plugins/mod_pep.lua @@ -124,6 +124,9 @@ end local function get_broadcaster(username) local user_bare = jid_join(username, host); local function simple_broadcast(kind, node, jids, item) + if kind == "retract" then + kind = "items"; -- XEP-0060 signals retraction in an <items> container + end local message = st.message({ from = user_bare, type = "headline" }) :tag("event", { xmlns = xmlns_pubsub_event }) :tag(kind, { node = node }); |