about summary refs log tree commit diff
path: root/app/lib/activitypub/activity
AgeCommit message (Collapse)Author
2019-03-04Fix remote poll expiration time (#10144)Eugen Rochko
2019-03-03Add polls (#10111)Eugen Rochko
* Add polls Fix #1629 * Add tests * Fixes * Change API for creating polls * Use name instead of content for votes * Remove poll validation for remote polls * Add polls to public pages * When updating the poll, update options just in case they were changed * Fix public pages showing both poll and other media
2019-02-28Improved remote thread fetching (#10106)ThibG
* Fetch up to 5 replies when discovering a new remote status This is used for resolving threads downwards. The originating server must add a “replies” attributes with such replies for it to be useful. * Add some tests for ActivityPub::FetchRepliesWorker * Add specs for ActivityPub::FetchRepliesService * Serialize up to 5 public self-replies for ActivityPub notes * Add specs for ActivityPub::NoteSerializer * Move exponential backoff logic to a worker concern * Fetch first page of paginated collections when fetching thread replies * Add specs for paginated collections in replies * Move Note replies serialization to a first CollectionPage The collection isn't actually paginable yet as it has no id nor a `next` field. This may come in another PR. * Use pluck(:uri) instead of map(&:uri) to improve performances * Fix fetching replies when they are in a CollectionPage
2019-02-27Fix mention processing for unknwon accounts on incoming ActivityPub Notes ↵ThibG
(#10125) `::FetchRemoteAccountService` is not `ActivityPub::FetchRemoteAccountService`, its second argument is the pre-fetched body. Passing `id: false` actually passed a `Hash` as the prefetched body, instead of properly resolving unknown remote accounts.
2019-02-17Add logging for rejected ActivityPub payloads and add tests (#10062)Eugen Rochko
2019-02-15Filter incoming Announce activities by relation to local activity (#10041)Eugen Rochko
* Filter incoming Announce activities by relation to local activity Reject if announcer is not followed by local accounts, and is not from an enabled relay, and the object is not a local status Follow-up to #10005 * Fix tests
2019-02-13Filter incoming Create activities by relation to local activity (#10005)Eugen Rochko
Reject those from accounts with no local followers, from relays that are not enabled, which do not address local accounts and are not replies to accounts that do have local followers
2019-02-13Alternative handling of private self-boosts (#9998)ThibG
* When self-boosting, embed original toot into Announce serialization * Process unknown self-boosts from Announce object if it is more than an URI * Add some self-boost specs * Only serialize private toots in self-Announces
2019-01-18Add tombstones for remote statuses (#9830)ThibG
* Add Tombstone model to remember object deletion * Do not recreate a status if it has been deleted * Record Tombstone for remote deleted items Also, only record deleted items from same-host actors * Clear an user's tombstones when their key change
2019-01-18Add support for non-public reblogs from ActivityPub (#9841)Eugen Rochko
Fix #9838
2019-01-16Use summary as summary for converted ActivityPub objects (#9823)Eugen Rochko
Fix #8609
2019-01-16Reduce chances of race conditions when processing deleted toots (#9815)ThibG
* Reduce chances of race conditions when processing deleted toots * Prevent race condition when processing deleted toots
2019-01-02Ensure blocked user unfollows blocker if Block/Undo Block are processed out ↵ThibG
of order (#9687) * Ensure blocked user unfollows blocker if Block/Undo Block are processed out of order * Add specs for Block causing unfollow and for out-of-order Block + Undo
2018-12-30Do not ignore federated reports targetting already-reported accounts (#9534)ThibG
2018-12-30Reduce usage of LD signatures (#9659)ThibG
* Do not LDS-sign Follow, Accept, Reject, Undo, Block * Do not use LDS for Create activities of private toots * Minor cleanup * Ignore unsigned activities instead of misattributing them * Use status.distributable? instead of querying visibility directly
2018-12-29Add handler for Move activity (#9629)Eugen Rochko
2018-12-26Fix ThreadResolveWorker getting queued with invalid URLs (#9628)Eugen Rochko
2018-11-16Prevent multiple handlers for Delete of Actor from running (#9292)Eugen Rochko
2018-11-10Fix emoji update date processing (#9255)ThibG
2018-10-30Accept the same payload in multiple inboxes and deliver (#9150)Eugen Rochko
2018-10-29Add Page AP type support (#9121)m.b
2018-10-26Ignore invalid hashtags on remote statuses instead of rejecting them (#9118)ThibG
Fixes #9115
2018-10-26Fix missing `mention` argument when processing incoming Create activities ↵ThibG
(#9114) * Fix missing `mention` argument when processing incoming Create activities * Fix typo (param → params)
2018-10-25Allow inbox owner to view implicitly targeted ActivityPub payload (#9093)Eugen Rochko
Fix #9091
2018-10-20Add option to block reports from domain (#8830)Eugen Rochko
2018-10-17Improve support for aspects/circles (#8950)Eugen Rochko
* Add silent column to mentions * Save silent mentions in ActivityPub Create handler and optimize it Move networking calls out of the database transaction * Add "limited" visibility level masked as "private" in the API Unlike DMs, limited statuses are pushed into home feeds. The access control rules between direct and limited statuses is almost the same, except for counter and conversation logic * Ensure silent column is non-null, add spec * Ensure filters don't check silent mentions for blocks/mutes As those are "this person is also allowed to see" rather than "this person is involved", therefore does not warrant filtering * Clean up code * Use Status#active_mentions to limit returned mentions * Fix code style issues * Use Status#active_mentions in Notification And remove stream_entry eager-loading from Notification
2018-10-11Fix typo in ActivityPub Create handler (#8952)Eugen Rochko
Regression from #8951
2018-10-11Move network calls out of transaction in ActivityPub handler (#8951)Eugen Rochko
Mention and emoji code may perform network calls, but does not need to do that inside the database transaction. This may improve availability of database connections when using pgBouncer in transaction mode.
2018-10-03Fix handling of ActivityPub activities lacking some attributes (#8864)ThibG
2018-09-28Fix class autoloading issue in ActivityPub::Activity::Create (#8820)Eugen Rochko
2018-09-18Redesign forms, verify link ownership with rel="me" (#8703)Eugen Rochko
* Verify link ownership with rel="me" * Add explanation about verification to UI * Perform link verifications * Add click-to-copy widget for verification HTML * Redesign edit profile page * Redesign forms * Improve responsive design of settings pages * Restore landing page sign-up form * Fix typo * Support <link> tags, add spec * Fix links not being verified on first discovery and passive updates
2018-08-26Add CLI task for rotating keys (#8466)Eugen Rochko
* If an Update is signed with known key, skip re-following procedure Because it means the remote actor did *not* lose their database * Add CLI method for rotating keys bin/tootctl accounts rotate [USERNAME] Generates a new RSA key per account and sends out an Update activity signed with the old key. * Key rotation: Space out Update fan-outs every 5 minutes per 1000 accounts * Skip suspended accounts in key rotation
2018-08-25Support ActivityStreams’ summaryMap. (#8422)M Somerville
In the same way as contentMap and nameMap.
2018-08-23Do not crash if remote custom emoji does not define updated date (fixes ↵ThibG
#8376) (#8377)
2018-08-17Implement Undo { Accept { Follow } } (fixes #8234) (#8245)ThibG
* Add Follow#revoke_request! * Implement Undo { Accept { Follow } } (fixes #8234)
2018-08-17Use correct activity id in Accept when receiving duplicate Follow (fixes ↵ThibG
#8218) (#8244)
2018-08-12Expect relays to answer with accept/reject (#8179)Eugen Rochko
2018-06-08Do not accept ActivityPub follow requests from blocked user (#7756)Eugen Rochko
* Do not accept ActivityPub follow requests from blocked user Fix #7745 * Deliver auto-rejection immediately when follow-requested by blocked account * Fix trailing whitespace
2018-05-31Exclude unlisted, private and direct toots from affecting trends (#7686)Eugen Rochko
2018-05-28Record trending tags from ActivityPub, too (#7647)Eugen Rochko
2018-05-25Ignore multiple occurrences of a hashtag within a status (fixes #7585) (#7606)ThibG
2018-05-18Resolve unknown status from Add activity, skip Remove if unknown (#7526)Eugen Rochko
Fix #7518
2018-05-16Raise Mastodon::RaceConditionError if Redis lock failed (#7511)Akihiko Odaki
An explicit error allows user agents to know the error and Sidekiq to retry.
2018-05-12Fetch boosted statuses on behalf of a follower (fixes #7426) (#7459)ThibG
When an ActivityPub Announce is processed and the boosted toot is not known, fetch it on behalf of one of the booster's followers. This is to allow fetching self-boosts of previously-unknown private toots. If fetching on behalf of a user fails, try fetching it anonymously: the selected follower of a boosting user may be banned by the boosted toot's author.
2018-05-04Store URIs of follows, follow requests and blocks for ActivityPub (#7160)Eugen Rochko
Same URI passed between follow request and follow, since they are the same thing in ActivityPub. Local URIs are generated during creation using UUIDs and are passed to serializers.
2018-05-03Fixes/do not override timestamps (#7336)ThibG
* Revert "Fixes/do not override timestamps (#7331)" This reverts commit 581a5c9d29ef2a12f46b67a1097a9ad6df1c6953. * Document Snowflake ID corner-case a bit more Snowflake IDs are used for two purposes: making object identifiers harder to guess and ensuring they are in chronological order. For this reason, they are based on the `created_at` attribute of the object. Unfortunately, inserting items with older snowflakes IDs will break the assumption of consumers of the paging APIs that new items will always have a greater identifier than the last seen one. * Add `override_timestamps` virtual attribute to not correlate snowflake ID with created_at
2018-05-03Fixes/do not override timestamps (#7331)ThibG
* Do not override timestamps for incoming toots * Remove every reference to override_timestamps Statuses are now created with the announced publishing date and are only pushed to timelines if that date is at most 6 hours earlier than the time at which it is processed.
2018-05-02Accept actor object updates from all supported actor types (#7312)ThibG
2018-05-02Support Actors/Statuses with multiple types (#7305)Surinna Curtis
* Add equals_or_includes_any? helper in JsonLdHelper * Support arrays in JSON-LD type fields for actors/tags/objects. * Spec for resolving accounts with extension types * Style tweaks for codeclimate
2018-04-07Forward deletes on the same path as reply forwarding (#7058)Eugen Rochko
* Forward deletes on the same path as reply forwarding * Remove trailing whitespace