Kim Alvefur
b0e565598a
mod_pubsub: Allow configuring summary templates
...
Enables generation of summaries for more than Atom without additional
modules.
4 years ago
Kim Alvefur
c8ea4743f2
mod_pubsub: Use the util.xtemplate to render Atom summary
4 years ago
Kim Alvefur
55da054c9b
mod_pubsub: Use the 'pubsub#type' setting to pick summary generator
...
Allows using different ones even if multiple semantically different
formats share the same root element xmlns, e.g. generic Atom and
XEP-0277 entries.
4 years ago
Kim Alvefur
8a97d634a4
util.pubsub: Fix item store resize to "max"
...
Previously this would end up passing the "max" directly to the
underlying storage.
4 years ago
Kim Alvefur
f2f78d4bf9
mod_pubsub: Allow specifying the JID of the pubsub service
...
This allows overriding it in cases where it is not equal to module.host,
like say, in mod_pep
4 years ago
Kim Alvefur
63f44f3640
mod_pubsub: Fix notification stanza type setting ( fixes #1605 )
5 years ago
Kim Alvefur
ce3e3808f5
mod_pubsub: Lower priority of default <body> generator
...
in order to avoid conflict with a handler at the default (0) priority,
making it easier to write your own formatting in plugins.
this follows the common pattern of default modules having lower priority
5 years ago
Kim Alvefur
042b514235
mod_pubsub, mod_pep: Ensure correct number of children of <item/> ( fixes #1496 )
6 years ago
Kim Alvefur
5016e66640
mod_pubsub,mod_pep: Advertise maximum number of items via XEP-0122
...
Clients would generally be using the "max" symbol instead of discovering
this, but this also gets us validation and earlier rejection of out of
bounds values.
4 years ago
Kim Alvefur
b2327f5d4c
mod_pubsub: Update callbacks on reload to more completely refresh config
...
This would also release any resources held via references from these
callbacks.
I'm not sure why we don't just re-new() the whole thing.
Related to #1382
5 years ago
Kim Alvefur
9ced42c9fb
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.
5 years ago
Kim Alvefur
7711193903
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?
5 years ago
Kim Alvefur
8116134258
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.
5 years ago
Kim Alvefur
c5cb457793
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.
5 years ago
Kim Alvefur
4dc5192c99
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.
5 years ago
Kim Alvefur
8e27e5311a
mod_pubsub: Respect 'expose publisher' setting in item retrieval
5 years ago
Kim Alvefur
c880dee2af
mod_pubsub,mod_pep: Support "max" as 'pubsub#max_items'
...
Fixes #1643
API change: The argument to archive_itemstore() changes type to integer
5 years ago
Kim Alvefur
7af694f510
mod_pubsub: Comment on itemstore type
5 years ago
Kim Alvefur
4673e4897b
mod_pubsub: Simplify configuration for node data (see #1302 )
7 years ago
Kim Alvefur
e6400cd0d8
pubsub: Set pubsub#title as name attribute in disco#items ( fixes #1226 )
7 years ago
Kim Alvefur
6b22fae603
mod_pubsub: Fix summary generation for Atom entries to use the correct field
7 years ago
Kim Alvefur
533cefaaf1
mod_pubsub: Add support for thin notifications (without the full payload)
8 years ago
Kim Alvefur
8d3bfff0c2
mod_pubsub: Only attach publisher on normal "item" broadcasts
...
The 'publisher' is only on <item> in the schema.
8 years ago
Kim Alvefur
1e2b0d97f0
mod_pubsub: Prepare to support turning notifications off for each kind of broadcast
8 years ago
Kim Alvefur
98c9778cc7
util.pubsub: Pass "retract" as the type of such broadcasts
...
This moves some XEP-0060 awkwardness out of util.pubsub and into mod_pubsub
A retraction is broadcast in an <items> container, whereas most other
kinds of broadcasts are in a container with a name matching the 'kind'
attribute.
8 years ago
Matthew Wild
ff222c379d
mod_pubsub, mod_pep, util.pubsub: Move capability definitions into util.pubsub to avoid duplication
8 years ago
Kim Alvefur
31443e5e2e
mod_pubsub, mod_pep: The "restricted" affiliation should be allowed to be unsubscribed but nothing else
...
Can't revoke their subscriptions on change of access model otherwise
8 years ago
Kim Alvefur
9c54f104f1
mod_pubsub: Add 'get_configuration' capability to relevant affiliations
...
Like ca5228a7d907 did for mod_pep
Thanks pep.
8 years ago
Kim Alvefur
abeade9213
mod_pubsub: Add a public method for retrieving the service object
...
There is already a set_service()
8 years ago
Matthew Wild
756c775043
mod_pubsub: Add comment to document nodestore/itemstore methods
8 years ago
Kim Alvefur
4310c5f921
mod_pubsub: Restrict access model to 'whitelist' and 'open'
...
'presence' and 'roster' makes more sense for PEP
'auithorize' needs additional code for authorization flow
8 years ago
Kim Alvefur
b4e05514d2
mod_pubsub: Add configurable maximum on number of items
...
Like aefb96a52f5f
8 years ago
Kim Alvefur
5db776ea9e
mod_pubsub: Make generation of notification body into an event to allow extensibility
8 years ago
Kim Alvefur
0f1bc72843
mod_pubsub: Skip checks for adding body if no body generated
8 years ago
Kim Alvefur
9003eb5433
mod_pubsub: Remove unneeded stanza API call
8 years ago
Kim Alvefur
97644a7189
mod_pubsub: Move include_body option into subscription options
8 years ago
Kim Alvefur
eb28cd503f
mod_pubsub: Move service discovery to pubsub.lib to allow reuse
8 years ago
Kim Alvefur
eb45d3c3eb
mod_pubsub: Remove feature flag for data persistence since node config is now persistent
8 years ago
Kim Alvefur
fd8a2e2de4
mod_pubsub: Handle optional item (thanks jonasw)
...
The ‘item’ argument is optional, so it needs to handle it not being
included, or util.stanza will throw an error in add_child
8 years ago
Kim Alvefur
cc6d427f21
mod_pubsub: Add support for generation of a plain text <body> from Atom payloads
...
See https://xmpp.org/extensions/xep-0060.html#impl-body
8 years ago
Kim Alvefur
ee3814c0bf
mod_pubsub: Make the 'type' attribute on broadcast messages configurable
...
This adds support for the pubsub#notification_type field in the node
config form.
8 years ago
Kim Alvefur
8221c93baf
mod_pubsub: Set an id attribute on outgoing event messages
...
https://xmpp.org/extensions/xep-0060.html#impl-bounce
> a pubsub service SHOULD ensure that the <message/> stanza for each
> event notification it generates possesses an 'id' attribute with a
> value
8 years ago
Kim Alvefur
1700e2669a
mod_pubsub: Use moduleapi broadcast method
8 years ago
Kim Alvefur
f13a157f2e
mod_pubsub: Reject publishing of non-items
8 years ago
Matthew Wild
27db2bc431
mod_pubsub: Ignore unused parameter [luacheck]
8 years ago
Matthew Wild
7ee19812b5
mod_pubsub: Add nodestore to service configuration
8 years ago
Matthew Wild
4009623774
mod_pubsub: Some variable renames for clarity
8 years ago
Kim Alvefur
dbdac03b2d
mod_pubsub: Move service feature dection to pubsub.lib to allow reuse
8 years ago
Kim Alvefur
1fc4aa1192
mod_pep_plus, mod_pubsub: Remove unused reference to pubsub.lib handlers [luacheck]
8 years ago
Kim Alvefur
c4c07e032b
mod_pubsub: Add support for Create and Configure
8 years ago