about summary refs log tree commit diff
path: root/app/services/resolve_url_service.rb
AgeCommit message (Collapse)Author
2020-12-17Improve searching for private toots from URL (#14856)ThibG
* 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-03-12Fix some timeouts when searching URLs by limiting some database queries (#13253)ThibG
Only look up private toots from database if the request failed because of 401, 403 or 404 errors, as those may indicate a private toot, rather than something that isn't a toot or cannot be processed.
2020-01-03Fix URL search not returning private toots user has access to (#12742)ThibG
2019-12-17Clean up OStatus-related codepaths (#12173)ThibG
* Remove “protocol” argument and return value, as only ActivityPub is supported * Remove FetchRemoteAccountService, only use ActivityPub::FetchRemoteAccountService * Fix tests
2019-11-11Fix already-known remote private toots not being searchable by URL (#12336)ThibG
* Fix already-known remote private toots not being searchable by URL Whenever an URL search fails, and an account is provided, try getting a private status matching that URL from database. * Fix searching by `id` field instead of `uri`
2019-07-15Fix leaking private statuses the admin account follows (#11300)ThibG
Now that the request is signed, it can return private toots. Do not leak them.
2019-07-10Refactor fetching of remote resources (#11251)Eugen Rochko
2019-07-07Remove Atom feeds and old URLs in the form of `GET /:username/updates/:id` ↵Eugen Rochko
(#11247)
2019-06-26Add support for Audio activities (#11189)ThibG
Fixes #11127
2019-03-04Make sure the poll is created before storing its id (#10142)ThibG
* Make sure the poll is created before storing its id * Fix updating poll results * Support fetching Question activities from the search bar
2018-11-05Update resolve_url_service.rb (#9188)m.b
2018-08-15Allow accessing local private/DM messages by URL (#8196)ThibG
* Allow accessing local private/DM messages by URL (Provided the user pasting the URL is authorized to see the toot, obviously) * Fix SearchServiceSpec tests
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-02Support all ActivityPub actor types (#6997)Eugen Rochko
Fix #6973
2018-03-30Fix compatibility with PeerTube (#6968)ThibG
* Support fetching objects of convertible types by URL (fixes #6924) * Ignore invalid hashtags
2018-01-22Rename FetchRemoteResourceService to ResolveURLService (#6328)Akihiko Odaki
The service used to be named FetchRemoteResourceService resolves local URL as well.