Wykres commitów

631 Commity (51c46364f34044baf26e1f4efcc4b1f8a78f3bdd)

Autor SHA1 Wiadomość Data
Jason Robinson 70ae9a3322 Add some debug 2020-02-17 23:31:51 +02:00
Jason Robinson 3745d72bcd Wrap outbound HTML tags in link tags
If Django configured, otherwise just keep the
text as is. Django configuration must have the
base url and tags path for making the link.

Closes https://git.feneas.org/socialhome/socialhome/issues/571
Refs https://git.feneas.org/socialhome/socialhome/issues/572
2020-02-17 22:45:23 +02:00
Jason Robinson 1e3de327c3 Wrap outbound HTML mention links in span
This is Mastodon specific, but what can we do than copy the
biggest for greater compatibility.
2020-02-17 22:16:59 +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 3678c520dd Add mention class to outgoing ActivityPub HTML payload mentions
This seems to be a community convention to stop mentions rendering as
links, possibly?
2020-02-16 23:20:10 +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 5ab541440d Clarify usage of the configuration `get_profile_function`
Must be keyword arguments.
2020-01-18 02:17:35 +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 71ccfb9148 Rollback Matrix port removal from hostmeta results
Change requires full support for the server discovery flow.
2019-12-29 23:46:04 +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 33f1e4c707 Fix regression in outbound shares
Should never ship any code without a unit test...
2019-11-29 11:18:22 +02:00
Jason Robinson 56eeb6d371 Fix typo in handle_send fail early code 2019-11-28 22:22:39 +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 3290261c59 Merge branch 'ap-webfinger-profile-fetch' into 'master'
Support fetching ActivityPub profiles by handle

See merge request jaywink/federation!158
2019-11-02 23:06:24 +00: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 b69a35b597 Refactoring of webfinger fetching into a more central location 2019-11-03 00:37:10 +02:00
Jason Robinson d7563380a5 Use both protocols when fetching remote profiles by handle
Some ActivityPub platforms implement webfinger lookups for handles.
Try that if we're fetching a remote profile by handle. AP is tried first
then Diaspora.

Refs: https://git.feneas.org/socialhome/socialhome/issues/522
2019-11-03 00:20:10 +02:00
Jason Robinson 30694eafd2 Forgot changelog for the outgoing entity validation 2019-10-11 00:45:49 +03:00
Jason Robinson a97b7b15b9 Merge branch 'vaildate-outbound-entities' into 'master'
Always validate outbound entities

See merge request jaywink/federation!157
2019-10-10 21:28:02 +00:00
Jason Robinson ee7f3aef60 Only validate signatures for inbound entities
For now anyway.
2019-10-11 00:13:10 +03: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 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