Kim Alvefur <zash@zash.se> [Sun, 25 Jul 2021 18:58:25 +0200] rev 11730
mod_pubsub: Update configuration on reload (fixes #1382)
Because of the way the previous pubsub service is carried access module
reloads, it would retain the configuration options with their previous
values from when the service was first created.
Kim Alvefur <zash@zash.se> [Sun, 25 Jul 2021 16:33:19 +0200] rev 11729
mod_pubsub: Silence warning about 'service' as argument [luacheck]
Maybe the 'service' in the outer scope should be moved down to minimize
overlap with other functions that receive the same service as argument?
Kim Alvefur <zash@zash.se> [Sun, 25 Jul 2021 16:31:15 +0200] rev 11728
mod_pep: Remove now unused util.cache import
Kim Alvefur <zash@zash.se> [Thu, 22 Jul 2021 19:53:21 +0200] rev 11727
util.pubsub: Signal that 'persistent-items' is unsupported when disabled
XEP-0060 says that this the way to indicate that 'persistent-items' is
unsupported, but doesn't explicitly say if it being disabled in the node
configuration also counts as unsupported.
Kim Alvefur <zash@zash.se> [Wed, 21 Jul 2021 23:02:25 +0200] rev 11726
mod_pep: Remove use of RLU cache when persist_items was set to false
This behavior came from some confusion over the meaning of
persist_items. The correct behavior is that items are only stored when
it is set to true. When set to false, the service becomes a "pure"
publish-subscribe service, where items are forgotten immediately after
broadcasting.
Kim Alvefur <zash@zash.se> [Thu, 22 Jul 2021 21:01:11 +0200] rev 11725
util.pubsub: Fix behavior of persist_items disabled
When set to 'false' there is no need for a persistence interface at all,
since items are not persisted after being broadcast.
Had started wondering if maybe the behavior was wrong, after reading
parts of XEP-0060 that pointed in that direction.
Some discussion of this can be found in logs of
xmpp:xsf@muc.xmpp.org?join from around 2021-07-20
Thanks to Ralph for confirming.
Kim Alvefur <zash@zash.se> [Wed, 21 Jul 2021 23:35:08 +0200] rev 11724
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.
Kim Alvefur <zash@zash.se> [Wed, 21 Jul 2021 21:22:17 +0200] rev 11723
util.pubsub: Handle absence of node data interface
This is in preparation for fixing the behavior of 'persist_items', which
was misunderstood at some point. In mod_pep it toggles between
persistent storage and in-memory storage, while the correct behavior
would be to toggle whether published items are stored at all or
forgotten after being broadcast.
Kim Alvefur <zash@zash.se> [Sun, 25 Jul 2021 14:23:35 +0200] rev 11722
mod_pubsub: Remove publisher field when not exposing publisher
The publisher is already there on the item when the broadcaster gets it,
so it needs to do the opposite thing.
Kim Alvefur <zash@zash.se> [Sun, 25 Jul 2021 14:01:45 +0200] rev 11721
mod_pubsub: Normalize 'publisher' JID
All the XEP-0060 examples have the publisher attribute set to a bare
JID, but the text does allow it to be the full JID.
Since mod_pubsub is more likely used for open nodes that anyone can
subscribe to it makes sense to not leak the full JIDs. This is also
disabled by defaults.
In mod_pep on the other hand it might make sense to have the full JID
since that data is more likely to be broadcast to contacts which are
already somewhat trusted.