Kim Alvefur
9005d35b48
util.pubsub: Add method returning subset of config as metadata
...
Allows granting read only access to other sets of users using a separate
access control capability, which makes sense as some properties may be
intended to be public but read-only.
1 year ago
Kim Alvefur
25754509f4
util.pubsub: Fix test to account for not using util.error
1 year 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
1546e59310
util.pubsub: Add support for limiting number of items to retrieve
...
Hopefully this will eventually be upgraded to RSM, which is why the
argument is called 'resultspec' and is a table.
4 years ago
Kim Alvefur
dfed446a5a
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.
5 years ago
Kim Alvefur
ffeeffd35c
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.
5 years ago
Kim Alvefur
30d0c690a3
util.pubsub: Ignore unused argument in tests [luacheck]
6 years ago
Kim Alvefur
d8c2888045
util.pubsub: Cover subscription filter in a partial test
...
I'm not sure I understand spies well enough to test that the arguments
and return values are as expected.
Better than nothing at least.
6 years ago
Kim Alvefur
e0bcb4d7d4
tests: Silence [luacheck] warnings
6 years ago
Matthew Wild
b5b9b70c88
util.pubsub, pubsub.lib and tests: Add text to precondition-not-met error ( fixes #1455 )
6 years ago
Kim Alvefur
5d4504e51b
util.pubsub: Validate node configuration on node creation ( fixes #1328 )
7 years ago
Kim Alvefur
da56744645
util.pubsub: Add support for requesting multiple specific items (needed for #1305 )
7 years ago
Kim Alvefur
9f19a48ee2
util.pubsub: Restore subscription index from stored data ( fixes #1281 )
7 years ago
Matthew Wild
44b3954d56
util.pubsub: Allow publishing with a config that should be used as defaults only
7 years ago
Matthew Wild
56e97dc5d6
util.pubsub tests: Ensure necessary tests run in the defined order
7 years ago
Kim Alvefur
9e291a9656
util.pubsub tests: Fix whitespace
7 years ago
Matthew Wild
8dc2b41947
util.pubsub tests: Add tests for get_items()
7 years ago
Matthew Wild
23cfd1b4d0
Pubsub: Add tests for :get_last_item() and fix for non-persistent nodes
7 years ago
Kim Alvefur
16f48337f3
util.pubsub: Silence warnings in tests [luacheck]
...
Warnings introduced in c53663e13b51 according to bisect
7 years ago
Matthew Wild
a4a44c8d28
util.pubsub tests: Add TODO
8 years ago
Matthew Wild
9d19f12e26
util.pubsub tests: Add tests to confirm new access model is enforced on config change
8 years ago
Matthew Wild
330c5988ed
util.pubsub tests: Add initial node config tests
8 years ago
Matthew Wild
d24b7ceb6d
util.pubsub tests: Extend publishing tests to check for correct notification behaviour on subscribe/unsubscribe
8 years ago
Matthew Wild
f4a39e28dc
util.pubsub tests: Add tests for publish_model (publishers, open, subscribers)
8 years ago
Matthew Wild
17595df1a0
util.pubsub tests: Add some initial access model tests (open and whitelist)
8 years ago
Kim Alvefur
674da5cef0
util.pubsub: Drop now redundant capabilities from tests
8 years ago
Kim Alvefur
6eafee4a6e
util_pubsub_spec: Add test for #1082
8 years ago
Kim Alvefur
6e658ef651
spec/util_pubsub: Test whether someone can subscribe to a node
...
Test fails because of missing normalize_jid
8 years ago
Kim Alvefur
1292d83c8c
util.pubsub: Add simple test covering publishing and retrieving an item
8 years ago
Kim Alvefur
2fe0a4856a
util_pubsub_spec: Move util.pubsub import into a setup block
8 years ago
Kim Alvefur
980816bca6
util_pubsub_spec: Beginnings of tests for util.pubsub
8 years ago