about summary refs log tree commit diff
path: root/app/lib/activitypub
AgeCommit message (Collapse)Author
2018-03-19Ignore media validation when attaching to status during processing (#6822)Eugen Rochko
Fix #6821
2018-03-08fix validation error (media only status) (#6684)MitarashiDango
* fix validation error (media only status) * Incorporating review suggestions * Reflect similar fix to OStatus side * Fix not to include media in transaction * Restore the limit of the number of media * Fix not to return nil
2018-03-07Fix #6657 - Use target instead of origin in Remove activity (#6664)Eugen Rochko
2018-03-04Federate pinned statuses over ActivityPub (#6610)Eugen Rochko
* Federate pinned statuses over ActivityPub * Display pinned toots in web UI Fix #6117 * Fix migration * Fix tests * Update outbox_serializer.rb * Update remove_serializer.rb * Update add_serializer.rb * Update fetch_featured_collection_service.rb
2018-02-28Fix #5708: Reject->Follow will remove the follow if it exists (#6571)Eugen Rochko
2018-02-28Federated reports (#6570)Eugen Rochko
* Fix #2176: Federated reports * UI for federated reports * Add spec for ActivityPub Flag handler * Add spec for ReportService
2018-02-22Focal points (#6520)Eugen Rochko
* Add focus param to media API, center thumbnails on focus point * Add UI for setting a focal point * Improve focal point icon on upload item * Use focal point in upload preview * Add focalPoint property to ActivityPub * Don't show focal point button for non-image attachments
2018-02-17Push discovered status through streaming API within a time window (#6484)Eugen Rochko
Time window of 6 hours
2018-02-02Accept ActivityPub announce from the author of the original note (#6236)Akihiko Odaki
2018-01-19Process mentions and reblogs even from resolved threads (#6299)ThibG
This may lead to out-of-order notifications, but this is better than not having notifications at all.
2018-01-09Skip ActivityPub Announces of non-public objects (#6230)Eugen Rochko
* Skip ActivityPub Announces of non-public objects * Skip OStatus reblogs of non-public statuses
2018-01-09Add the author of a status to cc if reblogged (#6226)puckipedia
This makes slightly more sense, and ensures that the author of a post is always referenced in the audience (which some servers might rely on). And the announce is POSTed to the author's inbox anyways.
2018-01-08Revert #5772 (#6221)Eugen Rochko
2018-01-08Fix bad URL schemes being accepted (#6219)Eugen Rochko
* Fix actors accepting invalid URI schemes or different host between URI and URL * Fix statuses accepting invalid URI scheme or different host to actor * Adjust tests to new requirements * Improve readability of mismatching_origin?/invalid_origin? methods
2018-01-08Move Article from supported to converted types (#6218)puckipedia
2018-01-03Allow to dereference Follow object for ActivityPub (#5772)Akihiko Odaki
* Allow to dereference Follow object for ActivityPub * Accept IRI as object representation for Accept activity
2018-01-03Don't leave behind husk of remotely-deleted profile (#6159)Eugen Rochko
There's no reason for an Account record to persist after Delete->Actor is received. SuspendAccountService is necessary to make sure deleted toots get sent over streaming API properly and home feeds get cleaned up. By removing Account record, we can ensure that if in the future the account is restored remotely (or username reused), it can start with a clean slate.
2017-12-10Save media outside transaction (#5959)abcang
2017-12-06Using double splat operator (#5859)Yamagishi Kazutoshi
2017-11-30Add semi-support for Video/Image objects in ActivityPub (#5848)Eugen Rochko
* Add semi-support for Video/Image objects in ActivityPub Video and Image objects will create corresponding status records with manually crafted text contents (title + URL) * Extract html-url-finding logic into JsonLdHelper * Fallback to id when url missing, extract supported object types
2017-11-30Fix too many forwards (#5854)Eugen Rochko
* Avoid sending explicit Undo->Announce when original deleted * Do not forward a reply back to the server that sent it * Deduplicate inboxes of rebloggers' followers for delete forwarding * Adjust test * Fix wrong class, bad SQL, wrong variable, outdated comment
2017-11-18Profile redirect notes (#5746)Eugen Rochko
* Serialize moved accounts into REST and ActivityPub APIs * Parse federated moved accounts from ActivityPub * Add note about moved accounts to public profiles * Add moved account message to web UI * Fix code style issues
2017-11-16Improve language filter (#5724)Renato "Lond" Cerqueira
* Scrub text of html before detecting language. * Detect language on statuses coming from activitypub. * Fix rubocop comments. * Remove custom emoji from text before language detection
2017-10-27Allow ActivityPub Note's tag and attachment to be single objects (#5534)puckipedia
2017-10-17When status is fetched instead of delivered, do not stream it (#5437)Eugen Rochko
2017-10-14Use atomUri in Undo activity of Announce (#5376)unarist
This allows deletion of reblogs which delivered before with OStatus URI.
2017-10-08Set snowflake IDs for backdated statuses (#5260)Eugen Rochko
- Rename Mastodon::TimestampIds into Mastodon::Snowflake for clarity - Skip for statuses coming from inbox, aka delivered in real-time - Skip for statuses that claim to be from the future
2017-10-07Encode custom emojis as resolveable objects in ActivityPub (#5243)Eugen Rochko
* Encode custom emojis as resolveable objects in ActivityPub * Improve code style
2017-10-04Validate id of ActivityPub representations (#5114)Akihiko Odaki
Additionally, ActivityPub::FetchRemoteStatusService no longer parses activities. OStatus::Activity::Creation no longer delegates to ActivityPub because the provided ActivityPub representations are not signed while OStatus representations are.
2017-09-28Add ability to specify alternative text for media attachments (#5123)Eugen Rochko
* Fix #117 - Add ability to specify alternative text for media attachments - POST /api/v1/media accepts `description` straight away - PUT /api/v1/media/:id to update `description` (only for unattached ones) - Serialized as `name` of Document object in ActivityPub - Uploads form adjusted for better performance and description input * Add tests * Change undo button blend mode to difference
2017-09-26Fix #5059 - Stop processing payload if it's from local account (#5100)Eugen Rochko
2017-09-25Add missing validations in ActivityPub::Activity::Create (#5096)Akihiko Odaki
2017-09-19Introduce OStatus::TagManager (#5008)Akihiko Odaki
2017-09-19Define emoji context for ActivityPub (#5004)Eugen Rochko
* Define emoji context for ActivityPub * Fix the emojo * Use general Mastodon context instead
2017-09-19Custom emoji (#4988)Eugen Rochko
* Custom emoji - In OStatus: `<link rel="emoji" name="coolcat" href="http://..." />` - In ActivityPub: `{ type: "Emoji", name: ":coolcat:", href: "http://..." }` - In REST API: Status object includes `emojis` array (`shortcode`, `url`) - Domain blocks with reject media stop emojis - Emoji file up to 50KB - Web UI handles custom emojis - Static pages render custom emojis as `<img />` tags Side effects: - Undo #4500 optimization, as I needed to modify it to restore shortcode handling in emojify() - Formatter#plaintext should now make sure stripped out line-breaks and paragraphs are replaced with newlines * Fix emoji at the start not being converted
2017-09-18Add published property to ActivityPub activity for reblogs (#5000)unarist
Since reblogs are serialized as Announce activity, its published property can be used for the creation time of reblog.
2017-09-17Raise an error on getting activity uri for remote status (#4984)unarist
We had returned `nil` for that case, but this raises an error instead, as a wrong usage of the method. This method is currently only used in ActivitySerializer.
2017-09-14Fix race condition when receiving an ActivityPub Create multiple times (#4930)ThibG
* Fix race condition when receiving an ActivityPub Create multiple times * Use a RedisLock to avoid concurrent processing of a same Create activity
2017-09-12Fix #4894 - Merge context hash into final JSON hash after key transform (#4898)Eugen Rochko
2017-09-08Handle stream_entry URL correctly in ActivityPub (#4854)unarist
In before, the method uses stream_entry id as status id, so replied status was wrongly selected. This PR uses StatusFinder which was introduced with `Api::Web::EmbedsController`.
2017-09-04Fix some ActivityPub JSON bugs (#4796)Eugen Rochko
- Fix assumption that `url` is always a string. Handle it if it's an array of strings, array of objects, object, or string, both for accounts and for objects - `sharedInbox` is actually supposed to be under `endpoints`, handle both cases and adjust the serializer
2017-09-02Rename "locked" to "manuallyApprovesFollowers" in ActivityPub (#4779)Eugen Rochko
See: <https://www.w3.org/wiki/Activity_Streams_extensions#as:manuallyApprovesFollowers>
2017-09-02Make "unfollow" undo pending outgoing follow request too (#4781)Eugen Rochko
* Make "unfollow" undo pending outgoing follow request too * Add cancel button to web UI when awaiting follow request approval * Make the hourglass button do the cancelling
2017-09-02Define missing JSON-LD properties (#4767)Eugen Rochko
Using _: property names is discouraged, as in the future, canonicalization may throw an error when encountering that instead of discarding it silently like it does now. We are defining some ActivityStreams properties which we expect to land in ActivityStreams eventually, to ensure that future versions of Mastodon will remain compatible with this even once that happens. Those would be `locked`, `sensitive` and `Hashtag` We are defining a custom context inline for some properties which we do not expect to land in any other context. `atomUri`, `inReplyToAtomUri` and `conversation` are part of the custom defined OStatus context.
2017-09-01Add ActivityPub handler for Delete->Actor activities (#4761)Eugen Rochko
2017-09-01Do not rely on activity arriving exactly once after delete arrived (#4754)Eugen Rochko
2017-09-01Deduplicate with local status on Create activity (#4763)unarist
2017-08-31Remove identity context from output of LinkedDataSignature (#4753)Eugen Rochko
2017-08-30Forward ActivityPub creates that reply to local statuses (#4709)Eugen Rochko
* Forward ActivityPub creates that reply to local statuses * Fix test * Fix wrong signers
2017-08-28Fix Delete activity handling when the status has been reblogged (#4729)unarist