about summary refs log tree commit diff
path: root/app/services
AgeCommit message (Collapse)Author
2023-01-11Fix/remove calling private method with send in model (#22951)Kaspar V
* fix(status): remove send usage for private unlink_from_conversations - make unlink_from_conversations public method - rename unlink_from_conversations to unlink_from_conversations! - fix send call on private method in statuses_vacuum and batched_remove_status_service * fix(feeds_vacuum): replace find_in_batches with in_batches because active record query results should be a little more efficient than itterating with map and each. Postgres can grasp such lists of ids much quicker than ruby can. Will probably make allmost no difference, but cannot hurt either.
2023-01-05Fix possible race conditions when suspending/unsuspending accounts (#22363)Claire
* Fix possible race conditions when suspending/unsuspending accounts * Fix tests Tests were assuming SuspensionWorker and UnsuspensionWorker would do the suspending/unsuspending themselves, but this has changed.
2023-01-05Be more lenient with OEmbed detection and validation (#22533)Effy Elden
2022-12-19Fix suspension worker crashing on S3-compatible setups without ACL support ↵Claire
(#22487)
2022-12-15Ensure exact match is the first result in hashtag searches (#21315)Claire
Fixes #17494
2022-12-15Change remote media files to be downloaded outside of transactions (#21796)Claire
2022-12-15Fix idempotency when database writes are slow (#21840)Brian Campbell
There is an idempotency key generated by clients when authoring a post, and stored in Redis, to ensure that if a user or client retries posting the same status, we don't get a duplicate. Hachyderm.io has been experiencing some filesystem and database performance issues, causing database writes to be slow. This can mean that there are successful posts, but the reverse proxy returns 504 Gateway Timeout before the idempotency status has been updated; users or clients who retry (such as Tusky which retries automatically, see tuskyapp/Tusky#2951) can re-try the same post with the same idempotency key before it has actually been recorded in Redis, leading to duplicate posts. To address this issue, move all of the database updates after the initial transaction that creates the status into the `postprocess_status!` method, so we can insert the idempotency key immediately after the status has been created, significantly reducing the window in which the status could be created but the idempotency key not yet stored. Note: this has not yet been tested; I'm submitting this PR for discussion and to offer to the Hachyderm.io admins to try out to fix the multiple posting problem. Co-authored-by: Brian Campbell <brcampbell@beta.team>
2022-12-07Fix unbounded recursion in account discovery (#22025)Claire
* Fix trying to fetch posts from other users when fetching featured posts * Rate-limit discovery of new subdomains * Put a limit on recursively discovering new accounts
2022-11-27Remove LDSignature on actor Delete activities (#21466)Claire
They are currently not used for anything and represent more than half of the payload size.
2022-11-27Fix attachments of edited statuses not being fetched (#21565)Claire
* Fix attachments of edited statuses not being fetched * Fix tests
2022-11-17Handle links with no href in VerifyLinkService (#20741)Joshua Wood
Before this change, the following error would cause VerifyAccountLinksWorker to fail: NoMethodError: undefined method `downcase' for nil:NilClass [PROJECT_ROOT]/app/services/verify_link_service.rb:31 :in `block in link_back_present?`
2022-11-14Support UTF-8 Characters in Domains During CSV Import (#20592)Hampton Lintorn-Catlin
* Support UTF-8 Characters in Domains During Import * Update Changelong
2022-11-10Improve performance by avoiding regex construction (#20215)James Tucker
```ruby 10.times { p /#{FOO}/.object_id } 10.times { p FOO_RE.object_id } ```
2022-11-09Fix NameError in Webfinger redirect handling in ↵Claire
ActivityPub::FetchRemoteActorService (#20260)
2022-11-09Fix being able to spoof link verification (#20217)Eugen Rochko
- Change verification to happen in `default` queue - Change verification worker to only be queued if there's something to do - Add `link` tags from metadata fields to page header of profiles
2022-11-08Change Report category to "violation" if rule IDs are provided (#20137)trwnh
* Change Report category to "violation" if rule IDs are provided * Fix LiteralAsCondition * Add parentheses to conditional statement
2022-11-07Fix validation error in SynchronizeFeaturedTagsCollectionWorker (#20018)Claire
* Fix followers count not being updated when migrating follows Fixes #19900 * Fix validation error in SynchronizeFeaturedTagsCollectionWorker Also saves remote user's chosen case for hashtags * Limit remote featured tags before validation
2022-11-05Fix n+1 query during status removal (#19753)Eugen Rochko
2022-11-04Fix reblogs being discarded after the reblogged status (#19731)Claire
2022-11-04Add caching for payload serialization during fan-out (#19642)Eugen Rochko
2022-11-04Change mentions of blocked users to not be processed (#19725)Claire
Fixes #19698
2022-11-02Fix bookmark import stopping at the first failure (#19669)Claire
Fixes #19389
2022-10-29Fix account migration form ever using outdated account data (#18429)Eugen Rochko
2022-10-27Fix wrong math function used in search query (#19481)Eugen Rochko
2022-10-26Fix negatives values in search index causing queries to fail (#19464)Eugen Rochko
2022-10-26Change unauthenticated search to not support pagination in REST API (#19326)Eugen Rochko
- Only exact search matches for queries with < 5 characters - Do not support queries with `offset` (pagination) - Return HTTP 401 on truthy `resolve` instead of overriding to false
2022-10-22Fix `Settings::FeaturedTagsController` (#19418)Yamagishi Kazutoshi
Regression from #19409
2022-10-22Change featured tag updates to add/remove activity (#19409)Takeshi Umeda
* Change featured tag updates to add/remove activity * Fix to check for the existence of feature tag * Rename service and worker * Merge AddHashtagSerializer with AddSerializer * Undo removal of sidekiq_options
2022-10-21Fix `FetchFeaturedCollectionService` spec (#19401)Yamagishi Kazutoshi
Regression from #19380
2022-10-20Add synchronization of remote featured tags (#19380)Takeshi Umeda
* Add LIMIT of featured tag to instance API response * Add featured_tags_collection_url to Account * Add synchronization of remote featured tags * Deliver update activity when updating featured tag * Remove featured_tags_collection_url * Revert "Add featured_tags_collection_url to Account" This reverts commit cff349fc27b104ded2df6bb5665132dc24dab09c. * Add hashtag sync from featured collections * Fix tag name normalize * Add target option to fetch featured collection * Refactor fetch_featured_tags_collection_service * Add LIMIT of featured tag to v1/instance API response
2022-10-05Fix deleted pinned posts potentially counting towards the pinned posts limit ↵Claire
(#19005) Fixes #18938
2022-09-28Fix translations not being formatted, other issues in web UI (#19245)Eugen Rochko
Fix #19237
2022-09-24Fix crash in FetchRemoteKeyService (#19225)Claire
Fix regression from #19212
2022-09-23Add user content translations with configurable backends (#19218)Eugen Rochko
2022-09-21Refactor ActivityPub handling to prepare for non-Account actors (#19212)Claire
* Move ActivityPub::FetchRemoteAccountService to ActivityPub::FetchRemoteActorService ActivityPub::FetchRemoteAccountService is kept as a wrapper for when the actor is specifically required to be an Account * Refactor SignatureVerification to allow non-Account actors * fixup! Move ActivityPub::FetchRemoteAccountService to ActivityPub::FetchRemoteActorService * Refactor ActivityPub::FetchRemoteKeyService to potentially return non-Account actors * Refactor inbound ActivityPub payload processing to accept non-Account actors * Refactor inbound ActivityPub processing to accept activities relayed through non-Account * Refactor how Account key URIs are built * Refactor Request and drop unused key_id_format parameter * Rename ActivityPub::Dereferencer `signature_account` to `signature_actor`
2022-09-20Add ability to filter followed accounts' posts by language (#19095)Eugen Rochko
2022-09-20Fix ProcessMentionService swallowing unprocessed mentions to ↵Claire
unconfirmed/unapproved users (#19191)
2022-09-20Improve error reporting and logging when processing remote accounts (#15605)Claire
* Add a more descriptive PrivateNetworkAddressError exception class * Remove unnecessary exception class to rescue clause * Remove unnecessary include to JsonLdHelper * Give more neutral error message when too many webfinger redirects * Remove unnecessary guard condition * Rework how “ActivityPub::FetchRemoteAccountService” handles errors Add “suppress_errors” keyword argument to avoid raising errors in ActivityPub::FetchRemoteAccountService#call (default/previous behavior). * Rework how “ActivityPub::FetchRemoteKeyService” handles errors Add “suppress_errors” keyword argument to avoid raising errors in ActivityPub::FetchRemoteKeyService#call (default/previous behavior). * Fix Webfinger::RedirectError not being a subclass of Webfinger::Error * Add suppress_errors option to ResolveAccountService Defaults to true (to preserve previous behavior). If set to false, errors will be raised instead of caught, allowing the caller to be informed of what went wrong. * Return more precise error when failing to fetch account signing AP payloads * Add tests * Fixes * Refactor error handling a bit * Fix various issues * Add specific error when provided Digest is not 256 bits of base64-encoded data * Please CodeClimate * Improve webfinger error reporting
2022-08-27Fix incorrect and slow cache invalidation in ClearDomainMediaService (#19062)Claire
Fixes #19060
2022-08-24Add ability to block sign-ups from IP (#19037)Eugen Rochko
2022-08-15Properly delete remote account's avatar/header when fetch/update (#18973)Jeong Arm
2022-07-17Add ability to follow hashtags (#18809)Eugen Rochko
2022-07-05Add customizable user roles (#18641)Eugen Rochko
* Add customizable user roles * Various fixes and improvements * Add migration for old settings and fix tootctl role management
2022-07-04Fix crash when a remote Flag activity mentions a private post (#18760)Claire
* Add tests * Fix crash when a remote Flag activity mentions a private post
2022-06-27Add notifications for new reports (#18697)Eugen Rochko
2022-06-09Add administrative webhooks (#18510)Eugen Rochko
* Add administrative webhooks * Fix error when webhook is deleted before delivery worker runs
2022-05-26Fix concurrent unfollowing decrementing follower count more than once (#18527)Eugen Rochko
2022-05-26Fix being able to appeal a strike unlimited times (#18529)Eugen Rochko
Peculiarity of the `has_one` association is that the convenience creation method deletes the previous association even if the new one is invalid
2022-05-26Fix being able to report otherwise inaccessible statuses (#18528)Eugen Rochko
2022-05-26Fix empty votes arbitrarily increasing voters count in polls (#18526)Eugen Rochko