about summary refs log tree commit diff
path: root/app/controllers/api/v1/accounts/statuses_controller.rb
AgeCommit message (Collapse)Author
2023-04-14Merge remote-tracking branch 'glitch/main' HEAD mainStarfall
2023-02-18Autofix Rubocop Style/IfUnlessModifier (#23697)Nick Schonning
2022-03-08Merge remote-tracking branch 'glitch/main'Starfall
2022-03-08Fix performance of account timelines (#17709)Eugen Rochko
* Fix performance of account timelines * Various fixes and improvements * Fix duplicate results being returned Co-authored-by: Claire <claire.github-309c@sitedethib.com> * Fix grouping for pinned statuses scope Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2022-01-31Merge branch 'glitchsoc'Starfall
2022-01-17Add support for private pinned posts (#16954)Claire
* Add support for private pinned toots * Allow local user to pin private toots * Change wording to avoid "direct message"
2021-04-26Further improve the media attached status query for accounts (#16106)abcang
2021-04-25Improve media attached status query (#16105)abcang
2020-10-08Merge branch 'glitch' into mainStarfall
2020-09-11Change REST API to return empty data for suspended accounts (#14765)Eugen Rochko
2020-08-31Merge branch 'glitch' into mainStarfall
2020-08-28Introduce ApplicationController#cache_collection_paginated_by_id (#14677)Akihiko Odaki
* Replace incorrect use of distinct with group Some uses of ActiveRecord::QueryMethods#distinct pass field names but they are incorrect for the current version of Rails. ActiveRecord::QueryMethods#group provides the expected behavior and benefits performance. See commit 6da24aad4cafdef8d8a2c92bac2002a5fc2fe9c8. * Introduce ApplicationController#cache_collection_paginated_by_id ApplicationController#cache_collection_paginated_by_id fuses ApplicationController#cache_collection and Paginable.paginate_by_id. An advantage of this method is that it prevents from modifying scope which Paginable.paginate_by_id may provide. ApplicationController#cache_collection always return an array and there is no possibility of the scope modification. It is also clear for a programmer, considering the implication of "cache". This method can also emit more efficient queries by using Cacheable.cache_ids before calling Paginable.paginate_by_id.
2020-08-28Replace incorrect use of distinct with group (#14675)Akihiko Odaki
Some uses of ActiveRecord::QueryMethods#distinct pass field names but they are incorrect for the current version of Rails. ActiveRecord::QueryMethods#group provides the expected behavior and benefits performance. See commit 6da24aad4cafdef8d8a2c92bac2002a5fc2fe9c8.
2020-05-10Port monsterfork@58c707c474multiple creatures
make data miners' lives harder by also requiring authentication on account api endpoints
2020-03-06Remove useless `respond_to` calls (#13208)Eugen Rochko
2019-09-27Improve status pin query (#11972)abcang
2019-08-30Fix error in REST API for an account's statuses (#11700)Eugen Rochko
2019-08-08Fix pinned statuses API returning pagination headers (#11526)Eugen Rochko
Fix #10227
2019-04-07Improve blocked view of profiles (#10491)Eugen Rochko
* Revert "Fix filtering of favourited_by, reblogged_by, followers and following (#10447)" This reverts commit 120544067fcca4bf6e71ba1ffb276c451c17c656. * Revert "Hide blocking accounts from blocked users (#10442)" This reverts commit 62bafa20a112ccdddaedb25723fc819dbbcd8e9a. * Improve blocked view of profiles - Change "You are blocked" to "Profile unavailable" - Hide following/followers in API when blocked - Disable follow button and show "Profile unavailable" on public profile as well
2019-04-01Hide blocking accounts from blocked users (#10442)ThibG
* Revert "Add indication that you have been blocked in web UI (#10420)" This reverts commit bd02ec6daa974dcd3231e73826a56e08dbeedadc. * Revert "Add `blocked_by` relationship to the REST API (#10373)" This reverts commit 9745de883b198375ba23f7fde879f6d75ce2df0f. * Hide blocking accounts from search results * Filter blocking accouts from account followers * Filter blocking accouts from account's following accounts * Filter blocking accounts from “reblogged by” and “favourited by” lists * Remove blocking account from URL search * Return 410 on trying to fetch user data from a user who blocked us * Return 410 in /api/v1/account/statuses for suspended or blocking accounts * Fix status filtering when performing URL search * Restore some React improvements Restore some cleanup from bd02ec6daa974dcd3231e73826a56e08dbeedadc * Refactor by adding `without_blocking` scope
2019-03-13Fix `tagged` param not being normalized before querying tags (#10249)Eugen Rochko
2019-02-26Improve account media query (#10121)abcang
2019-02-04Add featured hashtags to profiles (#9755)Eugen Rochko
* Add hashtag filter to profiles GET /@:username/tagged/:hashtag GET /api/v1/accounts/:id/statuses?tagged=:hashtag * Display featured hashtags on public profile * Use separate model for featured tags * Update featured hashtag counters on-write * Limit featured tags to 10
2018-12-27Add exclude_reblogs option to account statuses API (#9640)Eugen Rochko
Fix #9606
2018-12-20Allow unauthenticated REST API access to GET /api/v1/accounts/:id/statuses ↵Eugen Rochko
(#9573) Fix #7087 The same data is available over the ActivityPub outbox, RSS, and Atom, so there is little benefit to keeping it limited in this method.
2018-09-28Support min_id-based pagination in REST API (#8736)Eugen Rochko
* Allow min_id pagination in Feed#get * Add min_id pagination to home and list timeline APIs * Add min_id pagination to account statuses, public and tag APIs * Remove unused stub in reports API * Use min_id pagination in notifications, favourites, and fix order * Fix HomeFeed#from_database not using paginate_by_id
2018-07-05Add more granular OAuth scopes (#7929)Eugen Rochko
* Add more granular OAuth scopes * Add human-readable descriptions of the new scopes * Ensure new scopes look good on the app UI * Add tests * Group scopes in screen and color-code dangerous ones * Fix wrong extra scope
2018-05-16Do not use permitted_for scope when querying pinned statuses (#7510)Akihiko Odaki
permitted_for scope is slow when combined with pinned status scope. Fortunately permitted_for scope can safely be removed because a pinned status is always public.
2018-04-02Fix unpermitted parameters warning when generating pagination URLs (#6995)Eugen Rochko
2018-03-10Improve performance of account_media_status_ids (#6729)abcang
2018-03-01Ensure that boolean params in the API are parsed for truthiness (#6575)Eugen Rochko
Use Rails smart boolean cast to account for values such as "f", "0", "false", etc. Previously, if a param was present in the request, it would count as true.
2017-08-25Pinned statuses (#4675)Eugen Rochko
* Pinned statuses * yarn manage:translations
2017-07-07Refactor JSON templates to be generated with ActiveModelSerializers instead ↵Eugen Rochko
of Rabl (#4090)
2017-06-07Clean up for api/base controller (#3629)Matt Jankowski
* Move ApiController to Api/BaseController * API controllers inherit from Api::BaseController * Add coverage for various error cases in api/base controller
2017-05-31Spec coverage and refactor for the api/v1/accounts controllers (#3451)Matt Jankowski