This allows the UserType object to be serialized to for example
redis based background workers.
To get the real RsaKey object, use the UserType.rsa_private_key
property.
In the case that the root content is from ActivityPub world, sending
a reply for it wont currently work due to the problem of signing
the reply by the author, as there is no target guid to refer to.
We should fix this with various compatibility layers but for now
just raise an error in the log and continue to send to the activitypub
receivers.
The outbound function `outbound.handle_send` parameter `recipients`
structure has changed. It must now be a list of dictionaries,
containing at minimum the following: `fid` for the recipient endpoint,
`protocol` for the protocol to use and `public` as a boolean whether
the payload should be treated as visible to anyone.
For Diaspora private deliveries, also a `public_key` is required
containing the receiver public key. Note that passing in handles as
recipients is not any more possible - always pass in a url for `fid`.
It seems little-boxes replaced our crypto library which caused
a bit of a mayhem since some of the internal objects don't match.
If we need that library after all, will need to drop these type
hints.
Entities no longer have `handle` or `guid`, `target_guid` or
`target_handle` attributes. These are
now properties on the Diaspora entities only. For working with
entities, the new URI based attributes should be used. These are
`id`, `target_id` and `actor_id`. Depending on entity type, some
of these will be required while some not (just like with handle,
guid, target_guid and target_handle before).
All high level methods now expect ID's and return ID's for everything.
Internally the diaspora protocol still works with handle's and guid's.
This opens adding ActivityPub which works with URI ID's everywhere.
**Breaking change.** The high level `federation.outbound` functions `handle_send` and `handle_create_payload` signatures have been changed. This has been done to better represent the objects that are actually sent in and to add an optional `parent_user` object.
For both functions the `from_user` parameter has been renamed to `author_user`. Optionally a `parent_user` object can also be passed in. Both the user objects must have `private_key` and `handle` attributes. In the case that `parent_user` is given, that user will be used to sign the payload and for Diaspora relayables an extra `parent_author_signature` in the payload itself.