Wykres commitów

545 Commity (91b074118b0adbec9c9e20c6ce0a0c4d789049d7)

Autor SHA1 Wiadomość Data
Jason Robinson 91b074118b Start dev development cycle 0.19.0-dev 2019-10-10 22:37:03 +03:00
Jason Robinson e39896b958 Forgot to ensure ActivityPub support is always on. Release 0.18.1. 2019-10-06 15:03:52 +03:00
Jason Robinson ee1f2bb8a0 Add twine to dev requirements 2019-10-06 02:04:48 +03:00
Jason Robinson a5373347fe Release 0.18.0 2019-10-06 01:58:54 +03:00
Jason Robinson c90d8a72e0 Some clarifications for the docs and readme 2019-10-06 01:57:24 +03:00
Jason Robinson 041a44a525 Ensure ActivitypubComment can have public attribute
This is required since unlike our base Comment, Activitypub
originating comments will possibly have a public namespace
as a target. We represent that internally with the "public"
attribute.
2019-10-01 20:59:31 +03:00
Jason Robinson 8d2bc74556 Attach mentions in ActivityPub outgoing payloads
Any mentions given in the _mentions list or found in the raw_content
are attached as Mention tags before sending.

https://git.feneas.org/socialhome/socialhome/issues/522
2019-09-08 23:52:23 +03:00
Jason Robinson c5297fd940 Fix small error in docs 2019-09-08 23:08:18 +03:00
Jason Robinson 64f266e544 Refactor extract_mentions logic to base RawContentMixin
Since we're going to reuse the Diaspora style mentions syntax
(without the display name part), pull out the mentions extract code
from the Diaspora mixins to the base mixins.
2019-09-08 23:04:08 +03:00
Jason Robinson 2ff4e24821 Add some extra documentation on how certain protocol features are handled 2019-09-08 22:48:47 +03:00
Jason Robinson c3fd773f78 Extract mentions from ActivityPub payload content 2019-09-08 02:21:08 +03:00
Jason Robinson 7e93dc3da3 Fix _allowed_children check 2019-09-08 02:03:51 +03:00
Jason Robinson c997a1a2b4 Ensure diaspora mention is extracted even without display name part 2019-09-08 02:03:06 +03:00
Jason Robinson 42b6736361 Transform any found key in an AP payload if no other mapping 2019-09-08 02:00:11 +03:00
Jason Robinson a76e68b491 Accept both Document and Image objects as attachments 2019-09-08 01:59:31 +03:00
Jason Robinson c4e54d0027 Merge ImageObject into the base Image entity
No point having a separate object type when the features
of it match the entity Image type.

Also send out Image instead of Document for image type
attachments. Lets see if Mastodon and others are fine
with this.

Refs: https://git.feneas.org/socialhome/socialhome/issues/522
2019-09-08 00:12:04 +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 7dad9c8109 Add tags found on raw_content when sending ActivityPub entities
Tags are added as "type: Hashtag" objects into the payload object.

Refs: https://git.feneas.org/socialhome/socialhome/issues/522
2019-09-03 22:51:41 +03:00
Jason Robinson bac1e1f8e3 Parse attachments from fetched ActivityPub objects
For example images when processing a share of an unknown post.

Refs: https://git.feneas.org/socialhome/socialhome/issues/522
2019-09-02 23:31:07 +03:00
Jason Robinson f97be514cb Allow public key to be passed also as str to handle_send
This allows apps to serialize sending to things like Redis easier.
2019-08-31 14:44:01 +03:00
Jason Robinson e5dd3db0dc Fix delinkifier for hashtags and adjust tests 2019-08-31 14:10:11 +03:00
Jason Robinson d85126d605 Adjust ActivityPub hashtag delinkifier for markdown tag links
Since we now convert HTML to Markdown.
2019-08-29 23:35:32 +03:00
Jason Robinson 1070831b2d Support a larger set of ActivityPub Actor types 2019-08-29 23:17:23 +03:00
Jason Robinson da2d436fdf Allow UserType.private_key to be passed in as a string
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.
2019-08-29 22:50:57 +03:00
Jason Robinson 3dd18e301e Merge branch 'markdownify-html' into 'master'
Markdownify incoming HTML content from ActivityPub layer

See merge request jaywink/federation!156
2019-08-26 20:01:55 +00:00
Jason Robinson 49da8c0818 Add Python 3.7 to setup.py classifiers. Small tweaks to texts and tags. 2019-08-26 22:26:02 +03:00
Jason Robinson ed0b6c21e9 Add docs for the content/source HTML/Markdown rules 2019-08-26 22:24:09 +03:00
Jason Robinson 19fc2ad1dc Make a line of code prettier 2019-08-25 23:14:08 +03:00
Jason Robinson b17f5b5823 Host meta fetchers now support NodeInfo 2.1
This seems unreleased, and doesn't really add anything useful,
but just seen it in the wild.
2019-08-25 23:13:57 +03:00
Jason Robinson eab497d8fc Don't totally die fetching nodeinfo doc if it's broken
Check for JSONDecodeError and abort if a broken doc is found.
2019-08-25 23:13:14 +03:00
Jason Robinson e92792fa35 Markdownify incoming HTML content from ActivityPub layer 2019-08-25 22:55:00 +03:00
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