aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pubsub/pubsub.lib.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-05-21 00:44:37 +0200
committerKim Alvefur <zash@zash.se>2018-05-21 00:44:37 +0200
commit542e4301f6073f045444a3163eb320bf1c70b582 (patch)
tree2fc817112ea5198217f23ed8667d4c728e57e853 /plugins/mod_pubsub/pubsub.lib.lua
parentb993873f730e543de912343090211cb6cb52424b (diff)
downloadprosody-542e4301f6073f045444a3163eb320bf1c70b582.tar.gz
prosody-542e4301f6073f045444a3163eb320bf1c70b582.zip
mod_pubsub: Add support for generation of a plain text <body> from Atom payloads
See https://xmpp.org/extensions/xep-0060.html#impl-body
Diffstat (limited to 'plugins/mod_pubsub/pubsub.lib.lua')
-rw-r--r--plugins/mod_pubsub/pubsub.lib.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua
index 423abd86..aabfaad6 100644
--- a/plugins/mod_pubsub/pubsub.lib.lua
+++ b/plugins/mod_pubsub/pubsub.lib.lua
@@ -53,6 +53,11 @@ local node_config_form = dataform {
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 @@ function handlers.set_create(origin, stanza, create, service)
["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 @@ function handlers.owner_get_configure(origin, stanza, config, service)
["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 })