about summary refs log tree commit diff
path: root/app/services/follow_service.rb
AgeCommit message (Collapse)Author
2020-02-17add a `manual_only` (manual trust only) moderation option + handle more ↵multiple creatures
`reject_unknown`/graylist mode caveats
2020-02-15add admin option to toggle whether service/app accounts should be ↵multiple creatures
auto-trusted in graylist mode + give options better descriptions
2020-02-14add options to let admins customize how trusting or strict graylist ↵multiple creatures
federation should be
2020-01-20More smoke testing, I believe the stability is passable nowHolly 'Frinkel' Lotor
2020-01-20Original upstream mergeThibG
2019-12-10synchronize remote posts on first followmultiple creatures
2019-11-19Refactor all ActivityPub deliveries to be serialized and signed through one ↵Eugen Rochko
concern (#10966)
2019-10-12graylist (reject unknown) federation & known account auto-learning finally ↵multiple creatures
have toggle switches in site settings
2019-08-08add new `reject unknown` policy option to prevent spam & harassment from ↵multiple creatures
large/undermoderated servers
2019-05-21Drop OStatus support. Fix some of the Rspec tests.multiple creatures
2019-02-02Create Redisable#redis (#9633)ysksn
* Create Redisable * Use #redis instead of Redis.current
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-11-08Optimize the process of following someone (#9220)Eugen Rochko
* Eliminate extra accounts select query from FollowService * Optimistically update follow state in web UI and hide loading bar Fix #6205 * Asynchronize NotifyService in FollowService And fix failing test * Skip Webfinger resolve routine when called from FollowService if possible If an account is ActivityPub, then webfinger re-resolving is not necessary when called from FollowService. Improve options of ResolveAccountService
2018-08-26Bump interactions count when a follow happens (#8468)Eugen Rochko
2018-01-22Rename ResolveRemoteAccountService to ResolveAccountService (#6327)Akihiko Odaki
The service used to be named ResolveRemoteAccountService resolves local accounts as well.
2017-12-13Fix #5952 - NameError (regression from #5762) (#5999)Eugen Rochko
* Fix #5952 - NameError (regression from #5762) * Fix
2017-11-28Allow hiding of reblogs from followed users (#5762)aschmitz
* Allow hiding of reblogs from followed users This adds a new entry to the account menu to allow users to hide future reblogs from a user (and then if they've done that, to show future reblogs instead). This does not remove or add historical reblogs from/to the user's timeline; it only affects new statuses. The API for this operates by sending a "reblogs" key to the follow endpoint. If this is sent when starting a new follow, it will be respected from the beginning of the follow relationship (even if the follow request must be approved by the followee). If this is sent when a follow relationship already exists, it will simply update the existing follow relationship. As with the notification muting, this will now return an object ({reblogs: [true|false]}) or false for each follow relationship when requesting relationship information for an account. This should cause few issues due to an object being truthy in many languages, but some modifications may need to be made in pickier languages. Database changes: adds a show_reblogs column (default true, non-nullable) to the follows and follow_requests tables. Because these are non-nullable, we use the existing MigrationHelpers to perform this change without locking those tables, although the tables are likely to be small anyway. Tests included. See also <https://github.com/glitch-soc/mastodon/pull/212>. * Rubocop fixes * Code review changes * Test fixes This patchset closes #648 and resolves #3271. * Rubocop fix * Revert reblogs defaulting in argument, fix tests It turns out we needed this for the same reason we needed it in muting: if nil gets passed in somehow (most usually by an API client not passing any value), we need to detect and handle it. We could specify a default in the parameter and then also catch nil, but there's no great reason to duplicate the default value.
2017-09-10Default follows for new users (#4871)Eugen Rochko
When a new user confirms their e-mail, bootstrap their home timeline by automatically following a set of accounts. By default, all local admin accounts (that are unlocked). Can be customized by new admin setting (comma-separated usernames, local and unlocked only)
2017-09-09Fix #4852 - Check if already requested from FollowService (#4855)Eugen Rochko
2017-08-26Add handling of Linked Data Signatures in payloads (#4687)Eugen Rochko
* Add handling of Linked Data Signatures in payloads * Add a way to sign JSON, fix canonicalization of signature options * Fix signatureValue encoding, send out signed JSON when distributing * Add missing security context
2017-08-13ActivityPub delivery (#4566)Eugen Rochko
* Deliver ActivityPub Like * Deliver ActivityPub Undo-Like * Deliver ActivityPub Create/Announce activities * Deliver ActivityPub creates from mentions * Deliver ActivityPub Block/Undo-Block * Deliver ActivityPub Accept/Reject-Follow * Deliver ActivityPub Undo-Follow * Deliver ActivityPub Follow * Deliver ActivityPub Delete activities Incidentally fix #889 * Adjust BatchedRemoveStatusService for ActivityPub * Add tests for ActivityPub workers * Add tests for FollowService * Add tests for FavouriteService, UnfollowService and PostStatusService * Add tests for ReblogService, BlockService, UnblockService, ProcessMentionsService * Add tests for AuthorizeFollowService, RejectFollowService, RemoveStatusService * Add tests for BatchedRemoveStatusService * Deliver updates to a local account to ActivityPub followers * Minor adjustments
2017-07-19Correct OStatus inflection (Ostatus -> OStatus) (#4255)Eugen Rochko
2017-07-18Introduce Ostatus name space (#4164)Akihiko Odaki
* Wrap methods of ProcessFeedService::ProcessEntry in classes This is a change same with 425acecfdb15093a265b191120fb2d4e4c4135c4, except that it has the following changes: * Revert irrelevant change in find_or_create_conversation * Fix error handling for RemoteActivity * Introduce Ostatus name space
2017-06-19Rename FollowRemoteAccountService to ResolveRemoteAccountService (#3847)Eugen Rochko
Rename Activitypub to ActivityPub
2017-06-05Don't follow account if it's already followed (#3575)René Klačan
Closes https://github.com/tootsuite/mastodon/issues/3102
2017-05-05More robust PuSH subscription refreshes (#2799)Eugen Rochko
* Fix #2473 - Use sidekiq scheduler to refresh PuSH subscriptions instead of cron Fix an issue where / in domain would raise exception in TagManager#normalize_domain PuSH subscriptions refresh done in a round-robin way to avoid hammering a single server's hub in sequence. Correct handling of failures/retries through Sidekiq (see also #2613). Optimize Account#with_followers scope. Also, since subscriptions are now delegated to Sidekiq jobs, an uncaught exception will not stop the entire refreshing operation halfway through Fix #2702 - Correct user agent header on outgoing http requests * Add test for SubscribeService * Extract #expiring_accounts into method * Make mastodon:push:refresh no-op * Queues are now defined in sidekiq.yml * Queues are now in sidekiq.yml
2017-04-07Rewrite Atom generation from stream entries to use Ox instead of Nokogiri ↵Eugen
(#1124) * Rewrite Atom generation from stream entries to use Ox instead of Nokogiri::Builder StreamEntry is now limited to only statuses, which allows some optimization. Removed extra queries on AccountsController#show. AtomSerializer instead of AtomBuilderHelper used in AccountsController#show, StreamEntriesController#show, StreamEntryRenderer and PubSubHubbub::DistributionWorker PubSubHubbub::DistributionWorker moves n+1 DomainBlock query to PubSubHubbub::DeliveryWorker instead. All Salmon slaps that aren't based on StreamEntry still use AtomBuilderHelper and Nokogiri * All Salmon slaps now use Ox instead of Nokogiri. No touch from status on account
2017-02-26Add validation of media attachments, clean up mastodon-own exception classesEugen Rochko
2017-02-25Add tuning documentation, add <content> tags back to most salmons,Eugen Rochko
make status pagination headers generation more lax about next page existing
2017-02-13Add IDs to salmon slaps even if they are transient. Add title, too, mostlyEugen Rochko
in case of debugging incoming salmons. Add <thr:in-reply-to /> to favourite salmons because it seems to be required by GS.
2017-02-12Stop trying to shoehorn all Salmon updates into the poor database-connectedEugen Rochko
StreamEntry model. Simply render Salmon slaps as they are needed
2017-02-11After FollowService, re-fetch remote account asynchronously, do nothingEugen Rochko
if account lock info was up to date, otherwise re-do the FollowService with now updated information
2017-02-11Don't PuSH-resubscribe if already subscribedEugen Rochko
2017-02-11Make follow requests federateEugen Rochko
2017-02-05Don't allow people to follow people they blocked without unblocking firstEugen Rochko
2017-01-23Move merging/unmerging of timelines into background. Move blocking intoEugen Rochko
background as well since it's a computationally expensive
2016-12-26Follow requests send e-mail notifications, but are excluded from ↵Eugen Rochko
notifications API Better initial state for unlisted/nsfw toggles
2016-12-22Follow call on locked account creates follow request insteadEugen Rochko
Reflect "requested" relationship in API and UI Reflect inability of private posts to be reblogged in the UI Disable Webfinger for locked accounts
2016-12-22Add "locked" flag to accounts, prevent blocked users from following, ↵Eugen Rochko
force-unfollow blocked users
2016-12-18Removing external hub completely, fix #333 fixing digit-only hashtags,Eugen Rochko
removing web app capability from non-webapp pages
2016-12-06Add filters for suspended accountsEugen Rochko
2016-11-28Adding embedded PuSH serverEugen Rochko
2016-11-23Fix unfollows not clearing reblogs, fix blocks not clearing reblogs and ↵Eugen Rochko
notifications, skip ActionCable for follow/unfollow/block events, instead clear UI from blocked account's posts instantly if block request succeeds. Add forgotten i18n for sensitive content
2016-11-20Adding unified streamable notificationsEugen Rochko
2016-11-15Fix rubocop issues, introduce usage of frozen literal to improve performanceEugen Rochko
2016-10-06Fix #83 - if user cannot be found (or is self) throw error, don't return ↵Eugen Rochko
empty 200 This prevents the undefined profile from being opened in the first place on such an error
2016-10-05Move PubSubHubbub pinging to a background workerEugen Rochko
It can take as much as 0.5s if not longer to complete
2016-10-03Blocking will prevent e-mail notifications from blocked user, blocks in UIEugen Rochko
2016-09-29Improve code styleEugen Rochko