Fix reading `sharedInbox` from remote ActivityPub profiles. This caused public payloads not
to be deduplicated when sending public payloads to remote ActivityPub servers. Refetching
profiles should now fix this.
Closes#124
Outbound functions `handle_send` and `handle_create_payload` now accept an optional `payload_logger`
parameter. If given it should be a function that takes a `str` or `dict` payload as the only
parameter. This will be called for each generated payload.
It now requires one of the target attributes
to be set, not just `target_id`. This fixes
follows over the Diaspora protocol which broke
with stricter send validation added in 0.19.0.
Don't crash when parsing an invalid NodeInfo document where the
usage dictionary is not following specification. Some Pleroma
instances have started writing an object there.
Previously requirement was 30 seconds, which caused loss of messages
where signature validation didn't happen immediately, but in
a background worker which didn't immediately process the job.
Refs: https://git.feneas.org/socialhome/socialhome/issues/563
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.
Entities with `raw_content` now also contain a `_media_type` and
`rendered_content`.
The default `_media_type` is `text/markdown` except for ActivityPub
originating posts it defaults to `text/html`. If the ActivityPub
payload contains a `source`, that mediaType will be used instead.
Entities processed by inbound mappers will now have a list of
receivers in `_receivers`. This replaces the
`_receiving_actor_id` which was previously set for Diaspora entities.
UserType now has a `receiver_variant` which is one of `ReceiverVariant`
enum. `ACTOR` means this receiver is a single actor ID.
`FOLLOWERS` means this is the followers of the ID in the receiver.
Contains terrible hack to figure out if ActivityPub to/cc contains
a reference to the followers collection of the sender 🙈 . Will replace
"later" with proper fetch+cache solution, once we have a cache.
Refs: https://git.feneas.org/socialhome/socialhome/issues/522
Retraction produces a { Delete { Tombstone }} and receiving
one produces a Retraction. Retraction.entity_type is set as
"Object" since we don't know it just by looking at the payload.
Added support for Diaspora `Comment` entity `thread_parent_guid`
attribute.
Added `root_target_id` and `root_target_guid` to `Comment` base entity.
This allows referring to a parent object up the hierarchy chain for
threaded comments.
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`.
With two elements, `private` and `public`. These should be URL's
indicating where to send payloads for the recipient.
ActivityPub profiles will parse these values from incoming profile
documents. Diaspora entities will default to the inboxes in the
specification.