Wykres commitów

26 Commity (41785c2fdce1dbbd7db6d40e2e07eb55ebf7068b)

Autor SHA1 Wiadomość Data
Alain St-Denis 41785c2fdc Refactor jsonld context management. Move LD signing to entities/activitypub. Move jsonld document_loader caching to __init__.py. Fix tests. 2023-03-24 18:34:15 -04:00
Alain St-Denis 9df803dafe Render Activitypub outbound payloads with calamus. 2023-01-07 15:59:38 +00:00
Alain St-Denis 58c8f95e54 Add audio and video media objects and much more. 2022-08-19 17:01:44 +00:00
Jason Robinson 9972b9d3fb Extract Diaspora guid
Diaspora entity guid will now be extracted from ActivityPub payloads implementing the Diaspora extension.
2020-04-25 00:32:33 +03:00
Jason Robinson 13f0cf0db6 Stop markdownifying received ActivityPub content
It was causing more trouble than benefits. Just accept
HTML content into entities raw_content attribute and
let apps deal with it.
2020-04-12 23:32:42 +03:00
Jason Robinson fd63767263 Fix sharedInbox from remote ActivityPub profiles
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
2020-02-22 01:31:46 +02:00
Jason Robinson 9b137c491d Always validate outbound entities
This should stop invalid payloads being sent out, like shares
to the Diaspora network that have no target_guid (due to originating
from the AP side).

Temporary solution until mock posts are automatically created for
better cross-compatibility.

Refs: https://git.feneas.org/socialhome/socialhome/issues/522
2019-10-10 23:21:05 +03:00
Jason Robinson c3fd773f78 Extract mentions from ActivityPub payload content 2019-09-08 02:21:08 +03:00
Jason Robinson 54ecc5aea5 Always use markdownified `object.content` if `object.source` not markdown
This avoids for example text/bbcode ending up as raw_content which
we reserve for markdown.

Refs: https://git.feneas.org/socialhome/socialhome/issues/522
2019-09-03 23:25:45 +03:00
Jason Robinson e5dd3db0dc Fix delinkifier for hashtags and adjust tests 2019-08-31 14:10:11 +03:00
Jason Robinson e92792fa35 Markdownify incoming HTML content from ActivityPub layer 2019-08-25 22:55:00 +03:00
Jason Robinson 93e7ec3863 Fix Mastodon hashtag de-linkifier regexp 2019-08-18 23:20:46 +03:00
Jason Robinson 61a0fc442b Add media type and rendered content to entities with raw_content
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.
2019-08-18 22:37:18 +03:00
Jason Robinson 138f7263a1 Extract images as entity children from ActivityPub payloads 2019-08-17 18:00:34 +03:00
Jason Robinson a5fe105b6c Support incoming retraction of ActivityPub shares 2019-08-06 23:56:55 +03:00
Jason Robinson 79f580d01f Add support for ActivityPub Announce
Becomes a Share entity.

Refs: https://git.feneas.org/socialhome/socialhome/issues/522
2019-08-05 01:15:11 +03:00
Jason Robinson 41637e7688 Add receivers in mappers to inbound entities
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
2019-08-04 17:41:08 +03:00
Jason Robinson 80cce66734 Add support for Retraction to/from ActivityPub
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.
2019-07-21 01:35:35 +03:00
Jason Robinson fcb5d1147c Don't subclass ActivitypubComment from ActivitypubPost
Leads to annoying base class comparison problems since
this will make ActivitypubComment also a Post.
2019-06-30 01:29:49 +03:00
Jason Robinson a333f7a9aa Support parsing Comment entities for incoming ActivityPub payloads
Basically a Note with an inReplyTo.
2019-06-30 01:11:10 +03:00
Jason Robinson 471d40f05e Fix parsing AP Note's with inReplyTo 2019-06-30 01:10:34 +03:00
Jason Robinson 40c652c5f0 Support incoming Undo of a Follow for ActivityPub 2019-06-29 00:55:23 +03:00
Jason Robinson 30a2fadc65 Save source protocol and object on received ActivityPub objects
Also call validate entity on processing payloads to entities.
2019-05-12 18:32:41 +03:00
Jason Robinson afe584fa0d Add tests for Activitypub mappers new functionality 2019-03-20 23:11:22 +02:00
Jason Robinson 29ba501d31 Fix mapping of image urls from ActivityPub AS2 actor 2019-03-14 23:03:24 +02:00
Jason Robinson 008c8e8971 Inital passing ActivityPub mapper tests, Follow passes
Skip the rest of the tests, implement one by one until the same
functionality of the Diaspora mappers is ready.
2018-10-13 12:08:12 +03:00