Software /
code /
prosody
Comparison
plugins/mod_pubsub/pubsub.lib.lua @ 8978:9d6c0c11e383
mod_pubsub: Translate missing fields into node config
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 06 Jul 2018 16:04:26 +0200 |
parent | 8953:19cbe80df9c8 |
child | 8979:6897b2e18bdf |
comparison
equal
deleted
inserted
replaced
8977:f4030a506d6b | 8978:9d6c0c11e383 |
---|---|
433 return true; | 433 return true; |
434 end | 434 end |
435 local new_config = { | 435 local new_config = { |
436 ["max_items"] = tonumber(form_data["pubsub#max_items"]); | 436 ["max_items"] = tonumber(form_data["pubsub#max_items"]); |
437 ["persist_items"] = form_data["pubsub#persist_items"]; | 437 ["persist_items"] = form_data["pubsub#persist_items"]; |
438 ["notification_type"] = form_data["pubsub#notification_type"]; | |
439 ["include_body"] = form_data["pubsub#include_body"]; | |
438 }; | 440 }; |
439 local ok, err = service:set_node_config(node, stanza.attr.from, new_config); | 441 local ok, err = service:set_node_config(node, stanza.attr.from, new_config); |
440 if not ok then | 442 if not ok then |
441 origin.send(pubsub_error_reply(stanza, err)); | 443 origin.send(pubsub_error_reply(stanza, err)); |
442 return true; | 444 return true; |