Software /
code /
prosody
Comparison
plugins/mod_pubsub/mod_pubsub.lua @ 9187:bd452e4f5a13
mod_pubsub: Only attach publisher on normal "item" broadcasts
The 'publisher' is only on <item> in the schema.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 16 Aug 2018 15:18:29 +0200 |
parent | 9181:79cf1f74738f |
child | 9188:ef2616ade453 |
comparison
equal
deleted
inserted
replaced
9186:9f33a13eb011 | 9187:bd452e4f5a13 |
---|---|
57 end | 57 end |
58 | 58 |
59 if item then | 59 if item then |
60 item = st.clone(item); | 60 item = st.clone(item); |
61 item.attr.xmlns = nil; -- Clear the pubsub namespace | 61 item.attr.xmlns = nil; -- Clear the pubsub namespace |
62 if expose_publisher and actor then | 62 if kind == "items" then |
63 item.attr.publisher = actor | 63 if expose_publisher and actor then |
64 item.attr.publisher = actor | |
65 end | |
64 end | 66 end |
65 end | 67 end |
66 | 68 |
67 local id = new_id(); | 69 local id = new_id(); |
68 local msg_type = node_obj and node_obj.config.message_type or "headline"; | 70 local msg_type = node_obj and node_obj.config.message_type or "headline"; |