diff options
author | Matthew Wild <mwild1@gmail.com> | 2014-11-20 09:02:23 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2014-11-20 09:02:23 +0000 |
commit | 1717f1f2e18c51a7c3091f4a98f35db0b1de6860 (patch) | |
tree | 217d4945ee7c4a160ca684c43b495dbb4f73e3ad /plugins | |
parent | 083fe317b7d5bd743f31b7b0a115f710105eda41 (diff) | |
parent | 958a4e177ba331c8a1e6ccd333ab5892a8f86bfc (diff) | |
download | prosody-1717f1f2e18c51a7c3091f4a98f35db0b1de6860.tar.gz prosody-1717f1f2e18c51a7c3091f4a98f35db0b1de6860.zip |
Merge 0.10->trunk
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_pubsub/mod_pubsub.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/mod_pubsub/mod_pubsub.lua b/plugins/mod_pubsub/mod_pubsub.lua index 8c777f54..de027b58 100644 --- a/plugins/mod_pubsub/mod_pubsub.lua +++ b/plugins/mod_pubsub/mod_pubsub.lua @@ -11,6 +11,7 @@ local autocreate_on_publish = module:get_option_boolean("autocreate_on_publish", local autocreate_on_subscribe = module:get_option_boolean("autocreate_on_subscribe", false); local pubsub_disco_name = module:get_option("name"); if type(pubsub_disco_name) ~= "string" then pubsub_disco_name = "Prosody PubSub Service"; end +local expose_publisher = module:get_option_boolean("expose_publisher", false) local service; @@ -36,10 +37,13 @@ function handle_pubsub_iq(event) end end -function simple_broadcast(kind, node, jids, item) +function simple_broadcast(kind, node, jids, item, actor) if item then item = st.clone(item); item.attr.xmlns = nil; -- Clear the pubsub namespace + if expose_publisher and actor then + item.attr.publisher = actor + end end local message = st.message({ from = module.host, type = "headline" }) :tag("event", { xmlns = xmlns_pubsub_event }) |