Commit Graph

59 Commits (e881a5967149e34046f91d3f4445ebb457348b93)

Author SHA1 Message Date
ThibG dfaa219f88 Fix HTTP responses for salmon and ActivityPub inbox processing ()
* Return sensible HTTP status for ActivityPub inbox processing

* Return sensible HTTP status for salmon slap processing

* Return additional information to debug signature verification failures
Eugen Rochko f4ca116ea8 After 7 days of repeated delivery failures, give up on inbox ()
- A successful delivery cancels it out
- An incoming delivery from account of the inbox cancels it out
Eugen Rochko a187dcefa1 Instantly upgrade account to ActivityPub if we receive ActivityPub payload ()
Eugen Rochko 2db9ccaf3e Add sharedInbox to actors ()
Eugen Rochko 6e9eda5331 ActivityPub migration procedure ()
* ActivityPub migration procedure

Once one account is detected as going from OStatus to ActivityPub,
invalidate WebFinger cache for other accounts from the same domain

* Unsubscribe from PuSH updates once we receive an ActivityPub payload

* Re-subscribe to PuSH unless already unsubscribed, regardless of protocol
Eugen Rochko 6df8bd277b Set correct content-type for ActivityPub JSON ()
Eugen Rochko dd7ef0dc41 Add ActivityPub inbox ()
* Add ActivityPub inbox

* Handle ActivityPub deletes

* Handle ActivityPub creates

* Handle ActivityPub announces

* Stubs for handling all activities that need to be handled

* Add ActivityPub actor resolving

* Handle conversation URI passing in ActivityPub

* Handle content language in ActivityPub

* Send accept header when fetching actor, handle JSON parse errors

* Test for ActivityPub::FetchRemoteAccountService

* Handle public key and icon/image when embedded/as array/as resolvable URI

* Implement ActivityPub::FetchRemoteStatusService

* Add stubs for more interactions

* Undo activities implemented

* Handle out of order activities

* Hook up ActivityPub to ResolveRemoteAccountService, handle
Update Account activities

* Add fragment IDs to all transient activity serializers

* Add tests and fixes

* Add stubs for missing tests

* Add more tests

* Add more tests
Eugen Rochko a6328fc1b1 Minor ActivityPub JSON fixes ()
- Objects must have attributedTo instead of actor
- The current attribute belongs to CollectionPage, not Collection
Eugen Rochko 8c45cd0e36 Improve ActivityPub representations ()
* Improve webfinger templates and make tests more flexible

* Clean up AS2 representation of actor

* Refactor outbox

* Create activities representation

* Add representations of followers/following collections, do not redirect /users/:username route if format is empty

* Remove unused translations

* ActivityPub endpoint for single statuses, add ActivityPub::TagManager for better
URL/URI generation

* Add ActivityPub::TagManager#to

* Represent all attachments as Document instead of Image/Video specifically
(Because for remote ones we may not know for sure)

Add mentions and hashtags representation to AP notes

* Add AP-resolvable hashtag URIs

* Use ActiveModelSerializers for ActivityPub

* Clean up unused translations

* Separate route for object and activity

* Adjust cc/to matrices

* Add to/cc to activities, ensure announce activity embeds target status and
not the wrapper status, add "id" to all collections