about summary refs log tree commit diff
path: root/app/services
AgeCommit message (Collapse)Author
2022-10-28Merge branch 'main' into glitch-soc/merge-upstreamClaire
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-10-02Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/controllers/home_controller.rb`: Upstream made it so `/web` is available to non-logged-in users and `/` redirects to `/web` instead of `/about`. Kept our version since glitch-soc's WebUI doesn't have what's needed yet and I think /about is still a much better landing page anyway. - `app/models/form/admin_settings.rb`: Upstream added new settings, and glitch-soc had an extra setting. Not really a conflict. Added upstream's new settings. - `app/serializers/initial_state_serializer.rb`: Upstream added a new `server` initial state object. Not really a conflict. Merged upstream's changes. - `app/views/admin/settings/edit.html.haml`: Upstream added new settings. Not really a conflict. Merged upstream's changes. - `app/workers/scheduler/feed_cleanup_scheduler.rb`: Upstream refactored that part and removed the file. Ported our relevant changes into `app/lib/vacuum/feeds_vacuum.rb` - `config/settings.yml`: Upstream added new settings. Not a real conflict. Added upstream's new settings.
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-28Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/controllers/settings/preferences_controller.rb`: Upstream dropping `digest` from notifications emails while we have more notification emails settings. Removed `digest` from our list while keeping our extra settings. - `app/javascript/packs/admin.js`: Conflicts caused by glitch-soc's theming system. Applied the changes to `app/javascript/core/admin.js`. - `app/views/settings/preferences/other/show.html.haml`: Upstream removed a setting close to a glitch-soc-only setting. Applied upstream's change.
2022-08-27Fix incorrect and slow cache invalidation in ClearDomainMediaService (#19062)Claire
Fixes #19060
2022-08-25Merge branch 'main' into glitch-soc/merge-upstreamClaire
2022-08-24Add ability to block sign-ups from IP (#19037)Eugen Rochko
2022-08-21Merge branch 'main' into glitch-soc/merge-upstreamClaire
2022-08-15Properly delete remote account's avatar/header when fetch/update (#18973)Jeong Arm
2022-07-17Merge branch 'main' into glitch-soc/merge-upstreamClaire
- `.env.production.sample`: Our sample config file is very different from upstream since it is much more complete. Upstream added documentation for a few env variables. Copied the new variables/documentation from upstream. - `app/lib/feed_manager.rb`: Upstream added a timeline type (hashtags), while glitch-soc already had an extra one (direct messages). Not really a conflict but textually close changes. Ported upstream's changes. - `app/models/custom_emoji.rb`: Upstream upped the custom emoji size limit, while glitch-soc had configurable limits. Upped the default limits accordingly. - `streaming/index.js`: Upstream reworked how hastags were normalized. Minor conflict due to glitch-soc's handling of instance-local posts. Ported upstream's changes.
2022-07-17Add ability to follow hashtags (#18809)Eugen Rochko
2022-07-05Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/controllers/admin/base_controller.rb`: Minor conflict caused by glitch-soc's theming system. - `app/javascript/mastodon/initial_state.js`: Minor conflict caused by glitch-soc making use of max_toot_chars. - `app/models/form/admin_settings.rb`: Minor conflict caused by glitch-soc's theming system. - `app/models/trends.rb`: Minor conflict caused by glitch-soc having more granular notification settings for trends. - `app/views/admin/accounts/index.html.haml`: Minor conflict caused by glitch-soc's theming system. - `app/views/admin/instances/show.html.haml`: Minor conflict caused by glitch-soc's theming system. - `app/views/layouts/application.html.haml`: Minor conflict caused by glitch-soc's theming system. - `app/views/settings/preferences/notifications/show.html.haml`: Minor conflict caused by glitch-soc having more granular notification settings for trends. - `config/navigation.rb`: Minor conflict caused by glitch-soc having additional navigation items for the theming system while upstream slightly changed every line.
2022-07-05Merge branch 'main' into glitch-soc/merge-upstreamClaire
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-28Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `.github/workflows/build-image.yml`: Fix erroneous deletion in a previous merge. - `Gemfile`: Conflict caused by glitch-soc-only hCaptcha dependency - `app/controllers/auth/sessions_controller.rb`: Minor conflict due to glitch-soc's theming system. - `app/controllers/filters_controller.rb`: Minor conflict due to glitch-soc's theming system. - `app/serializers/rest/status_serializer.rb`: Minor conflict due to glitch-soc having an extra `local_only` property
2022-06-27Add notifications for new reports (#18697)Eugen Rochko
2022-06-10Merge branch 'main' into glitch-soc/merge-upstreamClaire
2022-06-09Add administrative webhooks (#18510)Eugen Rochko
* Add administrative webhooks * Fix error when webhook is deleted before delivery worker runs
2022-05-26Merge branch 'main' into glitch-soc/merge-upstreamClaire
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
2022-05-26Fix moderator leak in undo_mark_statuses_as_sensitive (#18525)Eugen Rochko
Signed-off-by: Eugen Rochko <eugen@zeonfederated.com> Co-authored-by: 40826d <74816220+40826d@users.noreply.github.com>
2022-05-26Merge branch 'main' into glitch-soc/merge-upstreamClaire
2022-05-26Change unapproved and unconfirmed account to not be accessible in the REST ↵Claire
API (#17530) * Change unapproved and unconfirmed account to not be accessible in the REST API * Change Account#searchable? to reject unconfirmed and unapproved users * Disable search for unapproved and unconfirmed users in Account.search_for * Disable search for unapproved and unconfirmed users in Account.advanced_search_for * Remove unconfirmed and unapproved accounts from Account.searchable scope * Prevent mentions to unapproved/unconfirmed accounts * Fix some old tests for Account.advanced_search_for * Add some Account.advanced_search_for tests for existing behaviors * Add some tests for Account.search_for * Add Account.advanced_search_for tests unconfirmed and unapproved accounts * Add Account.searchable tests * Fix Account.without_unapproved scope potentially messing with previously-applied scopes * Allow lookup of unconfirmed/unapproved accounts through /api/v1/accounts/lookup This is so that the API can still be used to check whether an username is free to use.
2022-05-24Merge branch 'main' into glitch-soc/merge-upstreamClaire
2022-05-17Fix NoMethodError when resolving a link that redirects to a local post (#18314)Claire
* Fix NoMethodError when resolving a link that redirects to a local post * Fix tests
2022-05-16Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/services/remove_status_service.rb`: Conflict due to glitch-soc having extra code for a proper direct visibility timeline, in a part of the code upstream refactored. Restored glitch-soc's extra code in the refactored bit.
2022-05-13Refactor how Redis locks are created (#18400)Eugen Rochko
* Refactor how Redis locks are created * Fix autorelease duration on account deletion lock
2022-05-08Merge branch 'main' into glitch-soc/merge-upstreamClaire
2022-05-06Allow VerifyLinkService to accept backlinks with differing case (#18320)Sara Golemon
2022-05-03Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `package.json`: Not really a conflict, upstream updated a dependency textually adjacent to a glitch-soc-only one. Updated the dependency as upstream did.
2022-05-02Fix ArgumentError when processing pinned posts from Friendica (#18260)Claire
Follow-up to #18254
2022-05-02Fix compatibility with Friendica regarding pinned posts (#18254)Claire
* Fix multiple database queries when fetching pinned posts for remote account * Fix compatibility with Friendica regarding pinned posts Fixes #18066 * Add tests