- Sign item requests with the service/node actor and use the publisher for `attributedTo`.
- http_server: add missing `requestor_actor_id` to all `ap_*_request` handlers.
- http_server: fix following acceptation in `handle_follow_activity`.
- http_server: unescape `%40` in `get_ap_actor_data` at the beginning and use
it everywhere.
- pubsub_service: delete subscription from storage on unsubscribe.
- Fix missing arguments in some calls.
- Fix various issues coming from conversion of data models to Pydantic.
- plugin XEP-0277: add `MbData.is_edit` property.
Tx-XMPP 0.12 has beaking change in `discoFeature.identities` because it now supports
`xml:lang` attribute, so this update implies updating the code everywhere were this is
used.
This is a huge configuration refactoring.
The configuration system now uses Pydantic settings, with better validation, better
support for environment variables and other goodies.
The main config files now use TOML instead of INI, this allow for better handling of
complex types, notably dict.
Plugins, components and frontends can declare their config settings in a class which will
be imported dynamically.
- Arguments are now grouped in a new `PageData` NamedTuple, making it simpler to use, and
easier to extend.
- Page index is automatically calculated, and can be checked in callback to know which
page to show.
- Form send by calling entity is automatically parsed, using original form to instantiate
the right field types.
- A new `DataForm.get_field` method use Generic type as second argument to retrieve the
right field when getting a `submit` form.
- Updated all classes registering Ad-Hoc commands to use the new system and simplify the
code.
Pydantic models are now used for Ad-Hoc commands callback data. The `AdHocCommand` model
can (de)serialise the callback by using its import string.
This change has several benefits:
- better data validation.
- the serialisation mechanism will make communication with frontends easier.
- open the door for automatic documentation.
rel 465
- `Credentials` is now a Pydantic based model.
- Mailing list related emails are now detected hand saved as pubsub items, using XEP-0277
blog items, and creating suitable nodes. The ID of the mailing list is used for root
node.
- Mailing list items are currently restricted to recipient associated JID.
- Words in square bracket in title `[Like][That]` are removed and converted to blog
categories.
- Method to convert between MbData and email (in both directions) have been created.
rel 462
Use of `pickle` to serialise data was a technical legacy that was causing trouble to store
in database, to update (if a class was serialised, a change could break update), and to
security (pickle can lead to code execution).
This patch remove all use of Pickle in favour in JSON, notably:
- for caching data, a Pydantic model is now used instead
- for SQLAlchemy model, the LegacyPickle is replaced by JSON serialisation
- in XEP-0373 a class `PublicKeyMetadata` was serialised. New method `from_dict` and
`to_dict` method have been implemented to do serialisation.
- new methods to (de)serialise data can now be specified with Identity data types. It is
notably used to (de)serialise `path` of avatars.
A migration script has been created to convert data (for upgrade or downgrade), with
special care for XEP-0373 case. Depending of size of database, this migration script can
be long to run.
rel 443
the gateway was supposing that comments where emitted from PEP of author. While this is
the case for most blog posts, it's not for comments. Instead the component is now using
`author_jid` which is retrieved by XEP-0277 plugin, and reject the item if the auhor is
not verified (i.e. if `publisher` attribute is not set by XMPP service).