mastodon/app/services
ThibG b1feb47055
Improve searching for private toots from URL (#14856)
* Improve searching for private toots from URL

Most of the time, when sharing toots, people use the toot URL rather than
the toot URI, which makes sense since it is the user-facing URL.

In Mastodon's case, the URL and URI are different, and Mastodon does not
have an index on URL, which means searching a private toot by URL is done
with a slow query that will only succeed for very recent toots.

This change gets rid of the slow query, and attempts to guess the URI from
URL instead, as Mastodon's are predictable.

* Add tests

* Only return status with guessed uri if url matches

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2020-12-17 06:51:49 +01:00
..
activitypub Add support for reversible suspensions through ActivityPub (#14989) 2020-11-08 00:28:39 +01:00
concerns Fix activity not being signed (#13948) 2020-06-03 08:33:30 +02:00
keys Add E2EE API (#13820) 2020-06-02 19:24:53 +02:00
account_search_service.rb Fix following restriction not working when exact match in account search (#14394) 2020-07-26 23:58:36 +02:00
after_block_domain_from_account_service.rb Fix account domain block not properly unfollowing accounts from domain (#14304) 2020-07-13 19:33:10 +02:00
after_block_service.rb Refactor feed manager (#14761) 2020-09-08 03:41:16 +02:00
after_unallow_domain_service.rb Change account suspensions to be reversible by default (#14726) 2020-09-15 14:37:58 +02:00
app_sign_up_service.rb Add IP-based rules (#14963) 2020-10-12 16:33:49 +02:00
authorize_follow_service.rb Remove Salmon and PubSubHubbub (#11205) 2019-07-06 23:26:16 +02:00
backup_service.rb Add E2EE API (#13820) 2020-06-02 19:24:53 +02:00
base_service.rb Remove unused AtomBuilderHelper (#1364) 2017-04-11 19:31:22 +02:00
batched_remove_status_service.rb Fix not publishing update of remote timeline (#13745) 2020-05-12 15:24:35 +02:00
block_domain_service.rb Add support for reversible suspensions through ActivityPub (#14989) 2020-11-08 00:28:39 +01:00
block_service.rb Fix BlockService trying to reject incorrect follow request (#11288) 2019-07-11 14:50:27 +02:00
bootstrap_timeline_service.rb Admin setting to disable default follows (#12566) 2019-12-16 23:55:50 +01:00
clear_domain_media_service.rb Make domain block/silence/reject-media code more robust (#13424) 2020-06-09 10:32:00 +02:00
delete_account_service.rb Undo outgoing follows when suspending a remote account (#15188) 2020-11-21 21:27:00 +01:00
deliver_to_device_service.rb Add E2EE API (#13820) 2020-06-02 19:24:53 +02:00
fan_out_on_write_service.rb Fix DMs not appearing into timelines (#15182) 2020-11-19 00:23:46 +01:00
favourite_service.rb Add option to be notified when a followed user posts (#13546) 2020-09-18 17:26:45 +02:00
fetch_link_card_service.rb Bump rubocop from 0.86.0 to 0.88.0 (#14412) 2020-09-01 03:04:00 +02:00
fetch_oembed_service.rb Fix link crawler not specifying accepted content-type (#12646) 2019-12-18 16:56:06 +01:00
fetch_remote_status_service.rb Fix an error when ActivityPub::FetchRemoteStatusService url is called with nil (#12652) 2019-12-18 16:54:03 +01:00
fetch_resource_service.rb Fix not being able to resolve public resources in development environment (#13505) 2020-04-25 22:01:08 +02:00
follow_service.rb Add option to be notified when a followed user posts (#13546) 2020-09-18 17:26:45 +02:00
import_service.rb Add import/export feature for bookmarks (#14956) 2020-11-19 17:48:13 +01:00
move_service.rb Fix account migration not affecting followers on origin server (#11980) 2019-09-29 16:23:13 +02:00
mute_service.rb Add duration parameter to muting. (#13831) 2020-10-13 01:01:14 +02:00
notify_service.rb Add option to be notified when a followed user posts (#13546) 2020-09-18 17:26:45 +02:00
post_status_service.rb Fix media not being marked sensitive when client sets a CW but no text (#13277) 2020-03-25 22:40:58 +01:00
precompute_feed_service.rb Refactor feed manager (#14761) 2020-09-08 03:41:16 +02:00
process_hashtags_service.rb Change hashtags to preserve first-used casing (#11416) 2019-07-28 05:59:51 +02:00
process_mentions_service.rb Fix followers synchronization mechanism not being triggered on mentions (#15026) 2020-10-23 14:22:16 +02:00
reblog_service.rb Add option to be notified when a followed user posts (#13546) 2020-09-18 17:26:45 +02:00
reject_follow_service.rb Remove Salmon and PubSubHubbub (#11205) 2019-07-06 23:26:16 +02:00
remove_status_service.rb Fix deletes not reaching every server that interacted with status (#15200) 2020-11-27 15:48:31 +01:00
report_service.rb Add indication to admin UI of whether a report has been forwarded (#13237) 2020-12-15 04:30:15 +01:00
resolve_account_service.rb Fix webfinger redirect handling in ResolveAccountService (#15187) 2020-11-19 19:52:06 +01:00
resolve_url_service.rb Improve searching for private toots from URL (#14856) 2020-12-17 06:51:49 +01:00
search_service.rb Fix hashtag search performing account search as well (#13758) 2020-05-14 23:37:37 +02:00
suspend_account_service.rb Add cache buster feature for media files (#15155) 2020-11-19 17:38:06 +01:00
tag_search_service.rb Add `exclude_unreviewed` param to `GET /api/v2/search` REST API (#11977) 2019-09-28 01:02:21 +02:00
unallow_domain_service.rb Fix removing allowed domains being done synchronously (#14302) 2020-07-15 21:08:19 +02:00
unblock_domain_service.rb Add support for reversible suspensions through ActivityPub (#14989) 2020-11-08 00:28:39 +01:00
unblock_service.rb Remove Salmon and PubSubHubbub (#11205) 2019-07-06 23:26:16 +02:00
unfavourite_service.rb Remove Salmon and PubSubHubbub (#11205) 2019-07-06 23:26:16 +02:00
unfollow_service.rb Fix Move handler queuing jobs that will fail if account is suspended (#11864) 2019-09-17 08:44:45 +02:00
unmute_service.rb Fix #231 - Muting 2017-03-02 18:49:32 +01:00
unsuspend_account_service.rb Add cache buster feature for media files (#15155) 2020-11-19 17:38:06 +01:00
update_account_service.rb Bump rubocop from 0.86.0 to 0.88.0 (#14412) 2020-09-01 03:04:00 +02:00
verify_link_service.rb Rescue SSL error in verify link service (#9914) 2019-01-24 15:38:18 +01:00
vote_service.rb Fix invalid votes from the API being accepted (#12601) 2020-01-12 14:17:03 +01:00