Commit graph libervia-backend/tests/unit/test_plugin_xep_0115.py
Author SHA1 Message Date
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
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