Commit graph libervia-backend/libervia/backend/plugins/plugin_xep_0115.py
Author SHA1 Message Date
Goffi
0f9bfc38ac plugin XEP-0115: minor reformatting 2026-06-08 14:26:15 +02:00
Goffi
67eea35d4e plugin XEP-0115: use the new raw_values from Tx-XMPP:
Libervia calls Tx-XMPP `typeCheck` on disco info reception to check and normalize values.
In the case of XEP-0115 this cause trouve as the normalization is lossy, and change the
type of some fields (booleans, JIDs). The new `raw_values` property has been added in
Tx-XMPP v0.15 to retrieve original `str` value, so this now used to build the hash.

fix 486
2026-06-08 10:44:53 +02:00
Goffi
29a39b771b plugin XEP-0115: Fix race condition on disco creation:
This patch chains disco query to `conn_deferred` to be sure that `client.disco` is set.

fix #484
2026-06-07 21:20:05 +02:00
Goffi
18d3f0167f plugin XEP-0115: Fix disco duplicate on caps node query + check own generation:
When caps node was requested, disco infos was returned from cache + infos from normal
disco gathering, resulting in doubled items and other entities rejecting the disco info.

This is fixed by subclassing the disco handler to add a trigger. This trigger is used by
XEP-0115 to short circuit the disco gathering and returned its cached data instead.

Our own hash is re-generated on each connection, and validated, so if there is a bug, this
helps see and catch it.
2026-05-04 16:44:39 +02:00
Goffi
b4f41fe4a5 plugin XEP-0115: Implement "Stream Feature":
Server features are now checked to find capabilities data and use it for disco caching.
This is §6.3 of the XEP.
2026-05-03 11:20:33 +02:00
Goffi
8d42a09208 core (disco), plugins identidy, XEP-0115:
- Fix data types, and use quotes data type to avoid immediate evaluation on Python < 3.14
- Better error catching folling change in `get_infos` in `memory.disco`.
- Some code modernisation (async coroutine).
2026-05-02 15:55:18 +02:00
Goffi
dd79a42931 plugin XEP-0115: refactoring and complete implementation:
- the XEP-0115 implementation has been completed with validation, caps node handling in
  disco requests, hash generation fixes, and real support for xml:lang.
- the `generate_hash` method has been moved from disco where it's not used anymore to
  XEP-0115.
- Disco doesn't hash systematically, it nos use a per-jid cache for non XEP-0115
  supporting client.
- code modernisation, with use of `get_plugin_data` for Client data in XEP-0115, type
  hints, etc.
- More comments have been added to link algorithms steps to the relevant part in
  specification.
2026-04-18 01:08:01 +02:00
Goffi
42c2f88b30 component pubsub: PEP presence access model and auto-subscription
- Implement `presence` access model for PEP nodes.
- Add PEP auto-subscription (`+notify` handling)
- New `get_pep_last_items` storage method to retrieve in a single query items to send to
  auto-subscribers.
- Online resource tracking.

This completes the PEP support.

rel 476
2026-04-15 20:51:51 +02:00
Goffi
68da01a043 Dates update. 2026-03-31 12:57:17 +02:00
Goffi
51776603e0 depdencies, core: update Tx-XMPP to be version >= 10.0:
This version changes the package name, so all `wokkel` imports habe been replaced by
`tx_xmpp`
2026-03-24 16:42:27 +01:00
Goffi
0a42dd3da3 core (main): renamed hasFeature to has_feature to fix inconsistency. 2025-09-05 19:31:50 +02:00
Goffi
53fdaa9d09 Reformatted code base using black. 2024-06-19 18:44:57 +02:00
Goffi
d2685ba11b refactoring: renamed sat package to libervia.backend 2023-06-02 11:49:51 +02:00
Renamed from sat/plugins/plugin_xep_0115.py (Browse further)