Jason Robinson
8bc398aec5
Really fix Mastodon hashtag de-linkifier
2019-08-18 23:43:24 +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
b0c6be6cd7
Add pyfed:inlineImage property to ActivityPub attachments
...
If we rip out embedded images from raw_content then mark them as
pyfed:inlineImage. Receiving side will know then that those
attachments are included as inline images should they wish to
exclude those, if they support inline images via markdown or html.
Also rip out all embedded images, not just the ones from the
senders domain.
2019-08-18 21:43:27 +03:00
Jason Robinson
88bf593e2e
Fix pyfed namespace in tests
2019-08-18 20:01:14 +03:00
Jason Robinson
e670f882f8
Fix and document the pyfed namespace
2019-08-18 19:56:08 +03:00
Jason Robinson
5045127072
Add a pyfed context to all AP payloads
2019-08-18 04:42:14 +03:00
Jason Robinson
564f917f7a
Render content with commonmark, save markdown to source
2019-08-18 04:25:13 +03:00
Jason Robinson
441a65e18a
Merge branch 'activitypub-outbound-local-images' into 'master'
...
Activitypub outbound embedded images
See merge request jaywink/federation!155
2019-08-18 00:48:14 +00:00
Jason Robinson
9ef0fd4547
Fix calling pre_send
2019-08-18 03:20:35 +03:00
Jason Robinson
f7f7d55ad8
Add entity children as attachments to Note based ActivityPub payloads
...
To support outgoing images.
2019-08-17 22:52:53 +03:00
Jason Robinson
00d243a785
Attach local images embedded into Post and Comment as attachments for AP
...
Rip out any embedded images for the senders domain into
entity._children list of Image objects.
2019-08-17 22:30:27 +03:00
Jason Robinson
b03be01e59
Add more notes about ActivityPub support status to docs
2019-08-17 18:25:38 +03:00
Jason Robinson
9e536c8f2b
Changelog for Image entity refactor
2019-08-17 18:21:23 +03:00
Jason Robinson
9617737993
Merge branch 'images-from-ap' into 'master'
...
Extract images from ActivityPub payloads
See merge request jaywink/federation!154
2019-08-17 15:15:53 +00:00
Jason Robinson
c2ae43fd4d
Move allowed image types to a constant in AP objects
2019-08-17 18:08:01 +03:00
Jason Robinson
138f7263a1
Extract images as entity children from ActivityPub payloads
2019-08-17 18:00:34 +03:00
Jason Robinson
2547a4d38c
Don't fail whole send process on failure to sign diaspora public payload
...
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.
2019-08-11 23:21:47 +03:00
Jason Robinson
33c4b903b1
Ensure AP mappers recognize public namespace in receivers
2019-08-11 01:34:27 +03:00
Jason Robinson
b3b592385c
Make AP 'to' always a list
2019-08-11 01:29:30 +03:00
Jason Robinson
9602b70c5d
Merge branch 'remove-links-from-ap-tags' into 'master'
...
Unlinkify tags on content from Mastodon
See merge request jaywink/federation!153
2019-08-07 21:17:27 +00:00
Jason Robinson
c51acadeb9
Unlinkify tags on content from Mastodon
...
Remove the <a> and <span> tags to make them just tags in text.
2019-08-08 00:12:32 +03:00
Jason Robinson
25a1ae660c
Merge branch 'activitypub-share' into 'master'
...
Add support for ActivityPub Announce
See merge request jaywink/federation!152
2019-08-06 21:22:49 +00:00
Jason Robinson
6e403cb1ae
Support outgoing retraction of shares in ActivityPub
2019-08-07 00:05:49 +03:00
Jason Robinson
a5fe105b6c
Support incoming retraction of ActivityPub shares
2019-08-06 23:56:55 +03:00
Jason Robinson
27a77e1316
Better support for fetching objects with ActivityPub
2019-08-06 23:18:24 +03:00
Jason Robinson
ade389c236
Use also attributedTo for ActivityPub object actor_id's
2019-08-06 01:28:55 +03:00
Jason Robinson
d6dd046b94
Fix check for followers in to/cc
2019-08-06 01:13:24 +03:00
Jason Robinson
f41b2fb9d8
Add ActivityPub support for retrieve_remote_content fetcher
2019-08-06 00:53:27 +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
91cb60aac5
Bump allowed Django version in dev requirements
2019-08-04 23:23:39 +03:00
Jason Robinson
0489caf151
Merge branch 'add-receivers-to-entity' into 'master'
...
Add receivers in mappers to inbound entities
See merge request jaywink/federation!151
2019-08-04 19:24:18 +00: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
d9637a6ae5
Merge branch 'activitypub-retractions' into 'master'
...
Add support for Retraction to/from ActivityPub
See merge request jaywink/federation!150
2019-07-20 23:03:18 +00: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
761ae5c5de
Merge branch 'root_target' into 'master'
...
Add support for root parent for Comment entity
See merge request jaywink/federation!149
2019-07-15 14:16:53 +00:00
Jason Robinson
1e757ca43b
Add support for root parent for Comment entity
...
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.
2019-07-15 00:09:53 +03:00
Jason Robinson
0b1231012d
Merge branch 'activitypub-replies' into 'master'
...
Support for outbound and inbound replies for ActivityPub
See merge request jaywink/federation!148
2019-06-29 22:52:13 +00: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
b4a4d7128a
Add outbound support for Comment entity over ActivityPub
2019-06-30 01:11:10 +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
14116923be
Merge branch 'jaywink/set-activitypub-profile-icon' into 'master'
...
Set profile icon properly for ActivityPub profiles
See merge request jaywink/federation!147
2019-06-29 21:24:59 +00:00
Jason Robinson
d0c8f6a20e
Set profile icon properly for ActivityPub profiles
2019-06-30 00:00:29 +03:00
Jason Robinson
1e629dd09c
Merge branch 'undo-follow' into 'master'
...
Support ActivityPub unfollow
See merge request jaywink/federation!146
2019-06-28 22:37:27 +00:00
Jason Robinson
f5db2ab835
Add support for outgoing unfollow in ActivityPub
...
Sent as Unfo{Follow}.
Also don't send an accept to an Undo{Follow}..
2019-06-29 01:21:33 +03:00
Jason Robinson
40c652c5f0
Support incoming Undo of a Follow for ActivityPub
2019-06-29 00:55:23 +03:00
Jason Robinson
68c956d68b
Merge branch 'fix-accept' into 'master'
...
Serialize accepted object into Accept
See merge request jaywink/federation!145
2019-06-28 21:33:31 +00:00
Jason Robinson
d9d936c736
Serialize accepted object into Accept
...
Instead of just referring to an ID which seems is not enough
for Mastodon at least.
2019-06-29 00:13:20 +03:00
Jason Robinson
9609892b9f
Fix regression in sending back an Accept for a Follow
2019-06-28 00:16:35 +03:00