about summary refs log tree commit diff
path: root/app/services
AgeCommit message (Collapse)Author
2017-06-26Raise an error if salmon request response is unsatisfactory (#3960)ThibG
2017-06-20Fix conversations (fixes #3869) (#3870)ThibG
* Actually create conversations given explicit URIs * Try to get the parent toot in before validation, to avoid creating a new conversation
2017-06-20Filter direct statuses in Status.as_home_timeline (#3842)Akihiko Odaki (@fn_aki@pawoo.net)
The classes using Status.as_home_timeline, namely Feed and PrecomputeFeedService are expected to filter direct statuses as FanOutWriteService does, but their filtering were incomplete or missing. This commit solves the problem by filtering direct statuses in as_home_timeline as the other similar methods such as as_public_timeline does.
2017-06-19Rename FollowRemoteAccountService to ResolveRemoteAccountService (#3847)Eugen Rochko
Rename Activitypub to ActivityPub
2017-06-15Fix #3633 by not spawning RemoteProfileUpdateWorker from ↵ThibG
FetchRemoteAccountService (#3642)
2017-06-14Fix account delete form not accepting password, update suspended (#3745)Eugen Rochko
account before removing content for quicker feedback to end-users
2017-06-14Batched remove status service (#3735)Eugen Rochko
* Make Pubsubhubbub::DistributionWorker handle both single stream entry arguments, as well as arrays of stream entries * Add BatchedRemoveStatusService, make SuspendAccountService use it * Improve method names * Add test * Add more tests * Use PuSH payloads of 100 to have a clear mapping of 1000 input statuses -> 10 PuSH payloads It was nice while it lasted
2017-06-14Account deletion (#3728)Eugen Rochko
* Add form for account deletion * If avatar or header are gone from source, remove them * Add option to have SuspendAccountService remove user record, add tests * Exclude suspended accounts from search
2017-06-14Fix #2619 - When redis feed is empty, fall back to database (#3721)Eugen Rochko
* Fix #2619 - When redis feed is empty, fall back to database * Use redis value to return feed from database only while RegenerationWorker hasn't finished running * Fix specs * Replace usage of reject!
2017-06-12Fix regression from #3672 - Do not use pipeline around zscore (#3704)Eugen Rochko
2017-06-11Fix an error when TagManager.local_url? is called with a bad URI (#3701)ThibG
TagManager.local_url? was sometimes called with an URI with a nil host, leading to a crash in TagManager.local_url?. This fixes moves the already-existing uri.host.blank? check in front to avoid this case.
2017-06-11Fix removal of status sending the original status to mentioned users instead ↵Eugen Rochko
of delete Salmon (#3672) * Fix removal of status sending the original status to mentioned users instead of delete Salmon, add test * Create remove_status_service_spec.rb
2017-06-11Refactor UpdateRemoteProfileService (#3690)Yamagishi Kazutoshi
2017-06-08Fix #3378 - If favourite/reblog already exists, return it instead of failing ↵Eugen Rochko
(#3641)
2017-06-08Fixes #3605 by returning account from database in case of race condition (#3606)ThibG
2017-06-08Improve RuboCop rules (compatibility to Code Climate) (#3636)Yamagishi Kazutoshi
https://github.com/codeclimate/codeclimate-rubocop/blob/08f8de84ebfb39caa96391e23816877278f6441c/Gemfile.lock#L38 Code Climate is using RuboCop v0.46.0. Change several rules to maintain compatibility.
2017-06-07Fix Code Climate failed (regression from #3622) (#3624)Yamagishi Kazutoshi
2017-06-07Fixes #3388 by moving re-entrant `shared_status_from_xml` before transaction ↵ThibG
block (#3622) Steps to reproduce the original issue: 1. Have two remote accounts, A that you don't follow, and B that you follow. 2. Have A post a toot and reply to it. 3. Boost A's reply from remote account B. This used to cause the local instance to get A's reply but fail to link it to the original post.
2017-06-06Fix 500 errors on searching invalid URLs (#3613)unarist
2017-06-06Try fixing ThreadResolveWorker calls (#3599)ThibG
* Try fixing ThreadResolveWorker calls From my understanding of ActiveRecord, a transaction is commited as soon as the exit of the outmost ActiveRecord.transaction block. However, inner transaction blocks will exit without the transaction being commited. In this case, ThreadResolveWorker were fired *within* a transaction block, so moving the call out of it should do the trick. However, this is somewhat fragile, as this whole codepath could be called within yet another transaction. * Set status thread within the transaction block if it is immediately available from database
2017-06-05Don't follow account if it's already followed (#3575)René Klačan
Closes https://github.com/tootsuite/mastodon/issues/3102
2017-06-04change sidekiq queueing to bulk push (#3536)takayamaki
2017-06-03Remove WarmCacheService (#3527)Yamagishi Kazutoshi
WarmCacheService is no longer used (removed with 5442083b3c44c731679fc489568bf7f70a807a39 ).
2017-05-31Misc tidying and clean ups (#3445)Matt Jankowski
* Remove trailing whitespace in i18n mailers * Use query methods instead of #present? on AR attributes * Delegate Status#account_domain method * Delegate Mention #account_username and #account_acct methods
2017-05-30Add status destroy authorization to policy (#3453)Jack Jennings
* Add status destroy authorization to policy * Create explicit unreblog status authorization
2017-05-30Move status reblog authorization into policy (#3425)Jack Jennings
2017-05-29Extract authorization policy for viewing statuses (#3150)Jack Jennings
2017-05-27Avoid comparing domains when looking for an exact match of a local account ↵happycoloredbanana
(#3336)
2017-05-27Fix some nil errors (#3338)Eugen Rochko
* Fix nil input not handled well in AuthorExtractor concern * Fix hard error in ProcessFeedService when replied-to status has been deleted * Fix nil errors in ProcessInteractionService when favourited status cannot be found
2017-05-23don't notify me when my toot is faved by someone i muted (#3245)beatrix
2017-05-22Similarly to #2426, put creation of remote statuses in a transaction, (#3233)Eugen Rochko
so that public timeline/caching would not encounter incomplete data
2017-05-20Use joins for account properties (#3167)Akihiko Odaki
2017-05-19Add buttons to block and unblock domain (#3127)Eugen Rochko
* Add buttons to block and unblock domain * Relationship API now returns "domain_blocking" status for accounts, rename "block entire domain" to "hide entire domain", fix unblocking domain, do not block notifications from domain-blocked-but-followed people, do not send Salmons to domain blocked users * Add test * Personal domain blocks shouldn't affect Salmon after all, since in this direction of communication the control is very thin when it comes to public stuff. Best stay consistent and not affect federation in this way * Ignore followers and follow request from domain blocked folks, ensure account domain blocks are not created for empty domain, and avoid duplicates in validation * Purge followers when blocking domain (without soft-blocks, since they are useless here) * Add tests, fix local timeline being empty when having any domain blocks
2017-05-19Unify the method of extracting tags (#3138)abcang
2017-05-19Specs for precompute feed service (#3142)Matt Jankowski
* Add spec for precompute feed service * Refactor PrecomputeFeedService * spec wip
2017-05-19Account domain blocks (#2381)Eugen Rochko
* Add <ostatus:conversation /> tag to Atom input/output Only uses ref attribute (not href) because href would be the alternate link that's always included also. Creates new conversation for every non-reply status. Carries over conversation for every reply. Keeps remote URIs verbatim, generates local URIs on the fly like the rest of them. * Conversation muting - prevents notifications that reference a conversation (including replies, favourites, reblogs) from being created. API endpoints /api/v1/statuses/:id/mute and /api/v1/statuses/:id/unmute Currently no way to tell when a status/conversation is muted, so the web UI only has a "disable notifications" button, doesn't work as a toggle * Display "Dismiss notifications" on all statuses in notifications column, not just own * Add "muted" as a boolean attribute on statuses JSON For now always false on contained reblogs, since it's only relevant for statuses returned from the notifications endpoint, which are not nested Remove "Disable notifications" from detailed status view, since it's only relevant in the notifications column * Up max class length * Remove pending test for conversation mute * Add tests, clean up * Rename to "mute conversation" and "unmute conversation" * Raise validation error when trying to mute/unmute status without conversation * Adding account domain blocks that filter notifications and public timelines * Add tests for domain blocks in notifications, public timelines Filter reblogs of blocked domains from home * Add API for listing and creating account domain blocks * API for creating/deleting domain blocks, tests for Status#ancestors and Status#descendants, filter domain blocks from them * Filter domains in streaming API * Update account_domain_block_spec.rb
2017-05-18Fetch remote image using http.rb (#3114)Yamagishi Kazutoshi
2017-05-17Fix #2572 - Resolve preview cards for remote statuses as well as local ones ↵Eugen Rochko
(#3088)
2017-05-16Make faster ProcessFeedService (#3080)Shunsuke Michii
* Add index accounts on uri. * Remove a blank line.
2017-05-15Feature conversations muting (#3017)Eugen Rochko
* Add <ostatus:conversation /> tag to Atom input/output Only uses ref attribute (not href) because href would be the alternate link that's always included also. Creates new conversation for every non-reply status. Carries over conversation for every reply. Keeps remote URIs verbatim, generates local URIs on the fly like the rest of them. * Conversation muting - prevents notifications that reference a conversation (including replies, favourites, reblogs) from being created. API endpoints /api/v1/statuses/:id/mute and /api/v1/statuses/:id/unmute Currently no way to tell when a status/conversation is muted, so the web UI only has a "disable notifications" button, doesn't work as a toggle * Display "Dismiss notifications" on all statuses in notifications column, not just own * Add "muted" as a boolean attribute on statuses JSON For now always false on contained reblogs, since it's only relevant for statuses returned from the notifications endpoint, which are not nested Remove "Disable notifications" from detailed status view, since it's only relevant in the notifications column * Up max class length * Remove pending test for conversation mute * Add tests, clean up * Rename to "mute conversation" and "unmute conversation" * Raise validation error when trying to mute/unmute status without conversation
2017-05-13Revert HTML CW changes (#3020)beatrix
* selectively Revert "Fix regressions from #2683 (#2970)" This reverts commit 72698bc3b49925a2b2955f32e5a562c1eecd729b. * Revert "Handle hashtags in spoiler_texts (partial fix for #699) (#2683)" This reverts commit e2491680e696d2c285a798ec4c66b26d2748df66.
2017-05-12Add conversation model, <ostatus:conversation /> (#3016)Eugen Rochko
* Add <ostatus:conversation /> tag to Atom input/output Only uses ref attribute (not href) because href would be the alternate link that's always included also. Creates new conversation for every non-reply status. Carries over conversation for every reply. Keeps remote URIs verbatim, generates local URIs on the fly like the rest of them. * Fix conversation migration * More spec coverage for status before_create * Prevent n+1 query when generating Atom with the new conversations * Improve code style * Remove redundant local variable
2017-05-12Fix not rejecting remote URIs when parsing out local IDs (#3012)Eugen Rochko
2017-05-11Fix #1426 - Trim long usernames in public follower/following lists (#2993)Eugen Rochko
Fix #2221 - Catch OpenSSL exceptions when loading remote avatars/headers/attachments Don't strip "rel" attribute from <a> tags when sanitizing (microformats)
2017-05-11Fix regressions from #2683 (#2970)Eugen Rochko
* Fix regressions from #2683 Properly format spoiler text HTML, while keeping old logic for blankness intact Process hashtags and mentions in spoiler text Format spoiler text for Atom Change "show more" toggle into a button instead of anchor Fix style regression on dropdowns for detailed statuses * Fix lint issue * Convert spoiler text to plaintext in desktop notifications
2017-05-10Fix #2955 - Send HEAD request ahead of GET when fetching URL previews (#2972)Eugen Rochko
2017-05-10Add `account_id DESC` to optimize PrecomputeFeedService (#2967)alpaca-tc
2017-05-10Handle hashtags in spoiler_texts (partial fix for #699) (#2683)R Tucker
* services: scan spoiler_text for hashtags (#699) * views: link hashtags from spoiler_texts This covers linking hashtags from within the spoiler text on the server-generated pages. * services: fix string concat going into hashtag RE Cleaner Ruby syntax, may handle immutable strings better
2017-05-10Add spec for Pubsubhubbub::DistributionWorker. PuSH-deliver public items (#2954)Eugen Rochko
to all subscribers. IDN-normalize callback URLs for subscriptions on insert.
2017-05-09Specs for pubsub subscribe service (#2951)Matt Jankowski
* Add spec for pubsubhubbub/subscribe * Refactor pubsubhubbub/subscribe service