Mercurial > prosody-hg
diff plugins/mod_pubsub/pubsub.lib.lua @ 8815:5974c9da1391
mod_pubsub: Add support for generation of a plain text <body> from Atom payloads
See https://xmpp.org/extensions/xep-0060.html#impl-body
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 21 May 2018 00:44:37 +0200 |
| parents | 07197f29e2b8 |
| children | 4afa77e0d2b0 |
line wrap: on
line diff
--- a/plugins/mod_pubsub/pubsub.lib.lua Mon May 21 00:35:45 2018 +0200 +++ b/plugins/mod_pubsub/pubsub.lib.lua Mon May 21 00:44:37 2018 +0200 @@ -53,6 +53,11 @@ label = "Persist items to storage"; }; { + type = "boolean"; + name = "pubsub#include_body"; + label = "Receive message body in addition to payload?"; + }; + { type = "list-single"; name = "pubsub#notification_type"; label = "Specify the delivery style for notifications"; @@ -196,6 +201,7 @@ ["max_items"] = tonumber(form_data["pubsub#max_items"]); ["persist_items"] = form_data["pubsub#persist_items"]; ["notification_type"] = form_data["pubsub#notification_type"]; + ["include_body"] = form_data["pubsub#include_body"]; }; end if node then @@ -384,6 +390,7 @@ ["pubsub#max_items"] = tostring(node_config["max_items"]); ["pubsub#persist_items"] = node_config["persist_items"]; ["pubsub#notification_type"] = node_config["notification_type"]; + ["pubsub#include_body"] = node_config["include_body"]; } local reply = st.reply(stanza) :tag("pubsub", { xmlns = xmlns_pubsub_owner })
