Kim Alvefur
0c6f17043f
mod_pep: Remove obsolete node restoration code (now done by util.pubsub)
...
Originally added in 202b9951b037 but util.pubsub gained a better method
in 6c2c2fc4b8dd since then, which mod_pep uses since 9194431b6447 which
should have deleted this.
All these :create calls would have failed with a 'conflict' error, since
the nodes had already been created. This was never noticed because of
missing error handling.
Also note that this code did not restore node configuration.
5 years ago
Kim Alvefur
5d24efb239
mod_pep: Remove now unused util.cache import
5 years ago
Kim Alvefur
1603e003b1
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.
5 years ago
Kim Alvefur
f01247ec56
mod_pep: Advertise base pubsub feature ( fixes #1632 )
...
Noticed while discussing feature discovery in Gajim
Thanks lovetox
5 years ago
Kim Alvefur
042b514235
mod_pubsub, mod_pep: Ensure correct number of children of <item/> ( fixes #1496 )
6 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
faa6cbefaf
mod_pep: Handle presence subscriptions in filter ( fixes #1372 )
...
Take two on 045209b41b3a
7 years ago
Kim Alvefur
1cc4ec5d80
mod_pep: Revert 045209b41b3a, caused a regression
...
Adding in all presence based subscriptions in the broadcaster caused
resend_last_item() to unintentionally send out more notifications than
it should have.
7 years ago
Kim Alvefur
cabd5216b4
mod_pep: Handle presence based subscription outside of util.pubsub ( fixes #1372 )
...
Subscriptions were updated for each incoming presence stanza from
contacts. Each subscription change triggered a configuration save, which
would filter out the presence based subscriptions and usually end up
replacing the existing data with identical data. With many subscribed
nodes this adds up to a fair bit of IO bound work that is avoided by
keeping them separate.
7 years ago
Kim Alvefur
e289d31177
mod_pep: Simplify configuration for node data ( fixes #1320 )
7 years ago
Kim Alvefur
9935e64396
mod_pep: Log node name instead of payload
...
Having the node logged is more useful and less problematic for privacy
7 years ago
Kim Alvefur
e6400cd0d8
pubsub: Set pubsub#title as name attribute in disco#items ( fixes #1226 )
7 years ago
Kim Alvefur
3d06d7c309
mod_pep: Add automatic subscriptions on node creation ( fixes #1222 )
...
Replaces automatic node creation on subscription, since this casues
problems when trying to keep nodes private or other specific settings.
7 years ago
Kim Alvefur
fd0c8253c6
mod_pep: Add PEP service owners username in configuration to ease identification
7 years ago
Kim Alvefur
3ad1358ad5
mod_pep: Remove use of recipients table for signaling pending disco#items
...
It stored the caps hash as a string in the recipients table while
waiting for a disco#info response, then replaces it with the set of
nodes that had +notify.
This mixing of types is bad, so here it gets removed.
This can be improved once an IQ tracking API (#714 ) is added.
7 years ago
Kim Alvefur
831dceeba3
mod_pep: Add all pubsub service objects to item API in order to behave across reloads
7 years ago
Matthew Wild
61efe5330e
mod_pep: Simplify code
7 years ago
Kim Alvefur
3353afd007
mod_pep: Remove feature for persistence already added elsewere
...
This is added in pubsub.lib
7 years ago
Kim Alvefur
440b7aee17
mod_pep: Remove already included access model feature
...
access-* is added in pubsub.lib based on node defaults
7 years ago
Kim Alvefur
b7e3b3d325
mod_pep: Respect setting for whether to include payload in notifications
8 years ago
Kim Alvefur
8121e242b0
mod_pep: Respect settings for which kinds of notifications to send
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
Kim Alvefur
47c821cf54
mod_pep: Handle disco#info queries to nodes ( fixes #805 )
9 years ago
Kim Alvefur
6104767242
mod_pep: Split long line [luacheck]
9 years ago
Matthew Wild
7df3613768
mod_pep, util.pubsub: Rename restricted->outcast, none->member and add new 'none' affiliation to better match XEP-0060
8 years ago
Matthew Wild
ff222c379d
mod_pubsub, mod_pep, util.pubsub: Move capability definitions into util.pubsub to avoid duplication
8 years ago
Matthew Wild
df4f835fc8
mod_pep: Add comment explaining 'none' affiliation
8 years ago
Matthew Wild
8d92ff2506
mod_pep: Remove "subscriber" affiliation in favour of "none"
...
It ended up with identical capabilities to "none", and isn't a standard
affiliation defined by XEP-0060 anyway.
8 years ago
Kim Alvefur
6e0fd20afd
mod_pep: Loosen restrictions on the "none" affiliation
...
This allows non-contacts access to data in nodes with the "open" access
model.
Thanks gerald
8 years ago
Kim Alvefur
edf02644be
mod_pep: Change default affiliation in the "presence" access model to "restricted" for non-contacts
...
This lets us loosen the restrictions of the "none" affiliation, so that
the "open" access model allows anyone basic access.
8 years ago
Kim Alvefur
052bd96a9f
mod_pep: Add comment about 'hash_map' table
8 years ago
Kim Alvefur
1a39a00afa
mod_pep: Correct comment about 'recipients' table
8 years ago
Kim Alvefur
e3c6e3f7c4
mod_pep: Pass 'recipients' table across module reloads
8 years ago
Kim Alvefur
474f5af7c9
mod_pep: Only resend last item on successful subscription
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
86f786bae5
mod_pep: Save non-presence based subscriptions to storage
8 years ago
Kim Alvefur
b57ae7dc18
mod_pep: Note which subscriptions are presence based as subscription option
8 years ago
Matthew Wild
b00069940d
mod_pep: Add 'get_configuration' capability to relevant affiliations
8 years ago
Kim Alvefur
a5c2b5abdf
mod_pep: Add comments describing root tables used for data
8 years ago
Kim Alvefur
f884543a6d
mod_pep: Restrict access models to 'presence', 'whitelist' and 'open'
...
'roster' needs additional support to inspect roster groups
'authorize' is not implemented
8 years ago
Kim Alvefur
50126a53b9
mod_pep: Move subscriber check into 'presence' access model callback
8 years ago
Kim Alvefur
2551d819b5
mod_pep: Set default access model to 'presence'
8 years ago
Kim Alvefur
46d630b02d
mod_pep: Return true if all node config checks passes (fixes configuration)
...
util.pubsub would treat the default nil return as falsy and reject all
attempts to configure nodes
8 years ago
Kim Alvefur
4e91846a0b
mod_pep: Silence warnings about unused arguments [luacheck]
8 years ago
Matthew Wild
5e053492eb
mod_pep: Add 'pep_max_items' option to set an upper limit, defaults to 256 (scientifically chosen)
8 years ago
Matthew Wild
860e165c3b
mod_pep -> mod_pep_simple, mod_pep_plus -> mod_pep
8 years ago
Kim Alvefur
d3f6d6cfa9
mod_pep: Remove unused variable [luacheck]
8 years ago
Kim Alvefur
97f4bd0e64
mod_pep: Rename variables to avoid name clash [luacheck]
8 years ago
Kim Alvefur
ec9c7c37aa
mod_pep: Move comment to a shorter line [luacheck]
8 years ago
Kim Alvefur
3ec060fc0c
Fix spelling throughout the codebase [codespell]
8 years ago