Software /
code /
prosody
Changeset
11720:72512c0858b3
mod_pubsub: Explicitly enable persistence by default to preserve behavior
Since nodes were always persistent according to the XEP-0060 definition.
Whether data is stored in memory or on disk was not what this setting
was meant for.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 21 Jul 2021 23:35:08 +0200 |
parents | 11719:3986b5a0c3fc |
children | 11721:7a77f0c05382 |
files | plugins/mod_pubsub/mod_pubsub.lua spec/scansion/pubsub_multi_items.scs util/pubsub.lua |
diffstat | 3 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_pubsub/mod_pubsub.lua Wed Jul 21 21:22:17 2021 +0200 +++ b/plugins/mod_pubsub/mod_pubsub.lua Wed Jul 21 23:35:08 2021 +0200 @@ -203,6 +203,9 @@ autocreate_on_subscribe = autocreate_on_subscribe; expose_publisher = expose_publisher; + node_defaults = { + ["persist_items"] = true; + }; nodestore = node_store; itemstore = create_simple_itemstore; broadcaster = simple_broadcast;
--- a/spec/scansion/pubsub_multi_items.scs Wed Jul 21 21:22:17 2021 +0200 +++ b/spec/scansion/pubsub_multi_items.scs Wed Jul 21 23:35:08 2021 +0200 @@ -47,7 +47,7 @@ <value>20</value> </field> <field var="pubsub#persist_items" label="Persist items to storage" type="boolean"> - <value>0</value> + <value>1</value> </field> <field var="pubsub#access_model" label="Specify the subscriber model" type="list-single"> <option label="authorize">
--- a/util/pubsub.lua Wed Jul 21 21:22:17 2021 +0200 +++ b/util/pubsub.lua Wed Jul 21 23:35:08 2021 +0200 @@ -132,7 +132,7 @@ local default_config_mt = { __index = default_config }; local default_node_config = { - ["persist_items"] = false; + ["persist_items"] = true; ["max_items"] = 20; ["access_model"] = "open"; ["publish_model"] = "publishers";