Wykres commitów

177 Commity (e1af61794b74f323c91409bb22931dd50c989bb0)

Autor SHA1 Wiadomość Data
Jason Robinson e1af61794b Add AP ID to outbound Diaspora payloads
Add ActivityPub ID to outbound Diaspora payloads of types comment, post and profile,
      if an URL given as `id`.
2020-04-25 03:04:55 +03:00
Jason Robinson be89ae5453 Add Diaspora guid/handle to post/profile outbound ActivityPub
Add Diaspora extension and guid to outbound ActivityPub payloads, if available. For
      profiles, also add handle.
2020-04-25 02:44:02 +03: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 7c1f1670b1 Fix tags separated by slashes not being identified
Fixes socialhome/socialhome#198
2020-04-13 12:40:35 +03:00
Jason Robinson a2653239d6 Fix some characters stopping tags being identified
Closes socialhome/socialhome#222
2020-04-13 11:46:10 +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 8200725e72 Add changelog for the relay fixes 2020-04-07 23:16:55 +03:00
Jason Robinson bdc44ac59c Don't always crash generating payloads if Django is installed but not configured 2020-02-22 01:32:19 +02: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 58d092d5f3 Expand payload_logger to log also protocol and sender 2020-02-20 22:13:26 +02:00
Jason Robinson cb36a143d4 Add payload logger for handle_send and handle_create_payload
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.
2020-02-20 21:55:21 +02:00
Jason Robinson 9cb2509ab6 Add replacer functionality to the find_tags utility 2020-02-17 21:58:00 +02:00
Jason Robinson b72ce5b870 Use find_tags when calculating tags from RawContentMixin.raw_content
Closes #70
2020-02-17 21:10:03 +02:00
Jason Robinson 712c6d2c46 Add `find_tags` text utility to find hashtags from text
Refs: https://git.feneas.org/socialhome/socialhome/issues/572
2020-02-17 21:05:36 +02:00
Jason Robinson 50a3e376dd Don't include OStatus for Mastodon 3.0+ protocols list
Refs: https://github.com/thefederationinfo/the-federation.info/issues/217
2020-02-16 16:35:30 +02:00
Jason Robinson 52eb8fc6cd Linkify URL's in outgoing ActivityPub payloads
Refs: #572
2020-01-26 01:21:41 +02:00
Jason Robinson 47d3d53a18 Add `process_text_links` text utility to linkify URL's in text
Moved from Socialhome.
2020-01-26 01:08:54 +02:00
Jason Robinson c479a42d47 Entities with a `raw_content` field now have URL syntax mentions rendered into a link
If Django is configured, a profile will be retrieved using the configured profile
getter function and the profile name or username will be used for the link.

Refs: https://git.feneas.org/socialhome/socialhome/issues/572
2020-01-18 01:39:44 +02:00
Jason Robinson 4c665e8743 Fix some edge case crashes of `handle_send` when there are Diaspora protocol receivers 2020-01-12 23:33:49 +02:00
Jason Robinson 6bc85a3bfa Loosen validation of `TargetIDMixin`
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.
2020-01-12 00:56:46 +02:00
Jason Robinson dd55916978 Fix changelog 2019-12-29 23:46:37 +02:00
Jason Robinson 557146055c Matrix and NodeInfo2 hostmeta parsers now clean the port out of the host name 2019-12-29 23:08:05 +02:00
Jason Robinson 8c4e4a2197 Correctly identify some platforms that emulate the Mastodon API
Ensure Pixelfed, Kroeg and Kibou instances that emulate the Mastodon API don't get identified as Mastodon instances.
2019-12-29 22:57:02 +02:00
Jason Robinson 9700af7bee Don't crash on malformed NodeInfo doc
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.
2019-12-29 22:28:25 +02:00
Jason Robinson 91dc3ca312 Add missing `response.raise_for_status()` call to the `fetch_document` network helper
when fetching with given URL. Error status was already being raised correctly when
fetching by domain and path.
2019-12-29 20:44:32 +02:00
Jason Robinson f6b2bb6d05 Don't crash loudly when fetching webfinger for Diaspora that does not contain XML 2019-12-15 22:55:21 +02:00
Jason Robinson 1f2fdf3459 Start new development cycle 2019-12-15 22:42:10 +02:00
Jason Robinson 3b31668a4d Release v0.19.0 2019-12-15 01:46:25 +02:00
Jason Robinson d84a990510 Fail early in outbound `handle_send` if a payload cannot be generated
For a payload which doesn't depend on recipient attributes, no point
in looping all recipients trying.
2019-11-28 21:11:12 +02:00
Jason Robinson 0f7b22bb04 Improve performance of generating ActivityPub payloads
For a large number of receivers in `handle_send`.

Only generate payload once and then just copy and attach receivers.
2019-11-28 21:02:13 +02:00
Jason Robinson e0d818f724 Allow HTTP Signature verification to pass if signature is 24 hours old
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
2019-11-27 23:21:31 +02:00
Jason Robinson 55a3d7c3fc Implement fetching of ActivityPub profiles by handle
Using webfinger.

Refs: https://git.feneas.org/socialhome/socialhome/issues/522
2019-11-03 01:03:45 +02:00
Jason Robinson 30694eafd2 Forgot changelog for the outgoing entity validation 2019-10-11 00:45:49 +03:00
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 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 c997a1a2b4 Ensure diaspora mention is extracted even without display name part 2019-09-08 02:03:06 +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 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 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 e670f882f8 Fix and document the pyfed namespace 2019-08-18 19:56:08 +03:00
Jason Robinson 9e536c8f2b Changelog for Image entity refactor 2019-08-17 18:21:23 +03:00
Jason Robinson f41b2fb9d8 Add ActivityPub support for retrieve_remote_content fetcher 2019-08-06 00:53:27 +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 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 a2c2d55a03 Changelog change for outbound handle_send parameters change 2019-06-26 00:01:12 +03:00
Jason Robinson dc8edbc7e6 Refactor handle_send function recipients and delivery code
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`.
2019-03-17 19:39:55 +02:00
Jason Robinson 80c4e433d7 Entities of type `Profile` now have a dictionary of `inboxes`
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.
2019-03-17 16:09:34 +02:00