about summary refs log tree commit diff
path: root/app/services
AgeCommit message (Collapse)Author
2018-06-15Remove placeholder text for media-only toots (#7806)Eugen Rochko
Ref: cfa9b6e13ab3c434f3901df6f614d0aa94a3d1ed This breaks compatibility with pre-2.3.0 Mastodon and older software, but at the time of writing the network is >80% above that version. Compatibility broken only for toots with no text.
2018-06-09Fix domain hiding logic (#7765)Eugen Rochko
* Send rejections to followers when user hides domain they're on * Use account domain blocks for "authorized followers" action Replace soft-blocking (block & unblock) behaviour with follow rejection * Split sync and async work of account domain blocking Do not create domain block when removing followers by domain, that is probably unexpected from the user's perspective. * Adjust confirmation message for domain block * yarn manage:translations
2018-06-04Skip processing when HEAD method returns 501 (#7730)Yamagishi Kazutoshi
2018-06-04Do not mark remote status sensitive even if spoiler text is present (#7395)Akihiko Odaki
Old statuses and statuses from Pawoo, which runs a modified version of Mastodon, may not have been marked sensitive even if spoiler text is present. Such statuses are still not marked sensitve if they are local or arrived before version upgrade. Marking recently fetched remote status sensitive contradicts the behavior. Considering what people expected when they authored such statuses, this change removes the sensitivity enforcement.
2018-05-31Exclude unlisted, private and direct toots from affecting trends (#7686)Eugen Rochko
2018-05-30Improve counter caches on Status and Account (#7644)Eugen Rochko
Do not touch statuses_count on accounts table when mass-destroying statuses to reduce load when removing accounts, same for reblogs_count and favourites_count Do not count statuses with direct visibility in statuses_count Fix #828
2018-05-29Reduce wasted work in RemoveStatusService due to inactive followers (#7672)Eugen Rochko
2018-05-27Track trending tags (#7638)Eugen Rochko
* Track trending tags - Half-life of 1 day - Historical usage in daily buckets (last 7 days stored) - GET /api/v1/trends Fix #271 * Add trends to web UI * Don't render compose form on search route, adjust search results header * Disqualify tag from trends if it's in disallowed hashtags setting * Count distinct accounts using tag, ignore silenced accounts
2018-05-21Use #any? instead of #exists? when checking media attachments (#7570)Eugen Rochko
If media_attachments are not loaded, SQL query is the same, but the #exists? method performs SQL query even if preloaded
2018-05-21Add media timeline (#6631)Yamagishi Kazutoshi
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-15Fix custom emoji handling in UpdateRemoteProfileService (OStatus) (#7501)unarist
This patch fixes NoMethodError and others in RemoteProfileUpdateWorker.
2018-05-14Fix account URI when updating ActivityPub account (#7488)Wiktor
Updates account `uri` field on each call to `update_account` instead of only once during `create_account` to mirror the same behavior in OStatus `ResolveAccountService` class [0]. ActivityPub accounts are identified using `@username` and `@domain` pair instead of URI since #6842. This fixes #7479: a bug when the account identified by `@username` and `@domain` changes its URI. [0]: https://github.com/tootsuite/mastodon/blob/03b69ebc450efc07246bd64204276941b7ede3fc/app/services/resolve_account_service.rb#L121
2018-05-14Call media.present? because media may be nil (#7474)abcang
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-11Add REST API for Web Push Notifications subscriptions (#7445)Eugen Rochko
- POST /api/v1/push/subscription - PUT /api/v1/push/subscription - DELETE /api/v1/push/subscription - New OAuth scope: "push" (required for the above methods)
2018-05-09Rescue Mastodon::LengthValidationError in FetchLinkCardService (#7424)Yamagishi Kazutoshi
2018-05-08Take the first recognized actor_type. (#7410)Surinna Curtis
2018-05-08Fix hashtags not being federated on mentions (fixes #6900) (#7406)ThibG
2018-05-07Bot nameplates (#7391)Eugen Rochko
* Store actor type in database * Add bot nameplate to web UI, add setting to preferences, API, AP Fix #7365 * Fix code style issues
2018-05-07Support explicitly supplying language code for status via REST API (#7389)Eugen Rochko
2018-05-05Fix handling of malformed ActivityPub payloads when URIs are nil (#7370)Eugen Rochko
* Fix handling of malformed ActivityPub payloads when URIs are nil * Gracefully handle JSON-LD canonicalization failures
2018-05-05Store home feeds for 7 days instead of 14 (#7354)Eugen Rochko
* Store home feeds for 7 days instead of 14 Reduces workload for status fan-out to active followers * Fix test for user model
2018-05-02Improve PostStatusService performance (#7317)Eugen Rochko
Offload creation of local notifications to a worker. Remove two redundant SQL queries from ProcessMentionsService, remove n+1 XML/JSON serialization via memoization
2018-05-02Slightly reduce RAM usage (#7301)Eugen Rochko
* No need to re-require sidekiq plugins, they are required via Gemfile * Add derailed_benchmarks tool, no need to require TTY gems in Gemfile * Replace ruby-oembed with FetchOEmbedService Reduce startup by 45382 allocated objects * Remove preloaded JSON-LD in favour of caching HTTP responses Reduce boot RAM by about 6 MiB * Fix tests * Fix test suite by stubbing out JSON-LD contexts
2018-05-02Keep notification when muting_notifications is true (#7311)abcang
* Keep notification when muting_notifications is true * Retrun mute object * Fix test
2018-05-02Remove most behaviour disparities between blocks and mutes (#7231)Eugen Rochko
* Remove most behaviour disparities between blocks and mutes The only differences between block and mute should be: - Mutes can optionally NOT affect notifications - Mutes should not be visible to the muted Fix #7230 Fix #5713 * Do not allow boosting someone you blocked Fix #7248 * Do not allow favouriting someone you blocked * Fix nil error in StatusPolicy
2018-05-02Guard against nil URLs in Request class (#7284)Eugen Rochko
Fix #7265
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-23Prevent suspended accounts from appearing in AccountSearchService (#7246)Emelia Smith
2018-04-22Remove "nsfw" category for sensitive statuses in OStatus serializer (#7048)Eugen Rochko
Fix #7011
2018-04-19Rescue SSL errors when processing mentions, remove useless line (#7184)Eugen Rochko
2018-04-18Direct messages column (#4514)Kaito Sinclaire
* Added a timeline for Direct statuses * Lists all Direct statuses you've sent and received * Displayed in Getting Started * Streaming server support for direct TL * Changes to match other timelines in 2.0
2018-04-16Remove extra spaces from search API queries and public account headers ↵ThibG
(fixes #7129) (#7152)
2018-04-14Add bio fields (#6645)Eugen Rochko
* Add bio fields - Fix #3211 - Fix #232 - Fix #121 * Display bio fields in web UI * Fix output of links and missing fields * Federate bio fields over ActivityPub as PropertyValue * Improve how the fields are stored, add to Edit profile form * Add rel=me to links in fields Fix #121
2018-04-13Ensure SynchronizeFeaturedCollectionWorker is unique and clean up (#7043)Eugen Rochko
* Ensure SynchronizeFeaturedCollectionWorker is unique and clean up Fix #7041 * Fix code style issue
2018-04-09When creating status, if no sensitive status is given, use default (#7057)Renato "Lond" Cerqueira
Clients using the API that do not provide the sensitive flag are always posting with false sensitive option.
2018-04-03Fix nil account issue in ProcessAccountService (#7019)Nolan Lawson
2018-04-02Support all ActivityPub actor types (#6997)Eugen Rochko
Fix #6973
2018-04-01[WIP] Enable custom emoji on account pages and in the sidebar (#6124)David Underwood
Federate custom emojis with accounts
2018-03-30Fix compatibility with PeerTube (#6968)ThibG
* Support fetching objects of convertible types by URL (fixes #6924) * Ignore invalid hashtags
2018-03-26Validate HTTP response length while receiving (#6891)Akihiko Odaki
to_s method of HTTP::Response keeps blocking while it receives the whole content, no matter how it is big. This means it may waste time to receive unacceptably large files. It may also consume memory and disk in the process. This solves the inefficency by checking response length while receiving.
2018-03-24Close http connection in perform method of Request class (#6889)Akihiko Odaki
HTTP connections must be explicitly closed in many cases, and letting perform method close connections makes its callers less redundant and prevent them from forgetting to close connections.
2018-03-20Use username/domain to match existing accounts in ActivityPub (#6842)Eugen Rochko
See also: #6837, #6667
2018-03-17Add entropy to download filenames (#6811)nightpool
pretty quick fix, and with the 1 week expiration i don't think we need to be too worried about the existing files closes #6798
2018-03-08For now, put a "." into no-text statuses with media for backcompat (#6691)Eugen Rochko
2018-03-08After blocking domain with reject_media, invalidate cache (#6679)Eugen Rochko
Media attachments are part of the association cache of statuses, since they are presumed to be immutable. Unless this cache is cleared manually, the statuses will continue to look like they have media embedded.
2018-03-07Remove text requirement when media attached from statuses (#6672)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-03-03Fix 500 while searching after deleting a post (#6604)Aboobacker MK
Fixes #6602