about summary refs log tree commit diff
path: root/app/controllers/api/v1/notifications_controller.rb
AgeCommit message (Collapse)Author
2023-02-01Change notifications per page from 15 to 40 in REST API (#23348)Eugen Rochko
2022-12-15Fix N+1 queries from in NotificationsController (#21202)nametoolong
Co-authored-by: Nonexistent <nx@example.org>
2022-03-15Add `types` param to `GET /api/v1/notifications` in REST API (#17767)Eugen Rochko
* Add `types` param to `GET /api/v1/notifications` in REST API * Improve tests
2021-01-31Improved performance of notification preloading (#15640)abcang
* Improved performance of notification preloading * Remove Cacheable from Notification * Fix test
2020-09-11Change REST API to return empty data for suspended accounts (#14765)Eugen Rochko
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-03-06Remove useless `respond_to` calls (#13208)Eugen Rochko
2019-05-21Add `account_id` param to `GET /api/v1/notifications` (#10796)Paul Woolcock
* Add `from_account` to notifications API this adds the ability to filter notifications by the account they originated from * passing a non-existent user should cause none to be returned * Fix codeclimate warnings * fix more codeclimate warnings * make requested changes: * use account id instead of user@domain * name the param `account_id` instead of `from_account` * Don't use `return` in a lambda
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-04-02Fix unpermitted parameters warning when generating pagination URLs (#6995)Eugen Rochko
2017-07-07Refactor JSON templates to be generated with ActiveModelSerializers instead ↵Eugen Rochko
of Rabl (#4090)
2017-06-08Improve RuboCop rules (compatibility to Code Climate) (#3636)Yamagishi Kazutoshi
https://github.com/codeclimate/codeclimate-rubocop/blob/08f8de84ebfb39caa96391e23816877278f6441c/Gemfile.lock#L38 Code Climate is using RuboCop v0.46.0. Change several rules to maintain compatibility.
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-31Refactor api/v1/notifications controller (#3470)Matt Jankowski
2017-04-22Added API for single notification dismissal (#2251)Ashley
* Added API backend for notification dismissal * Added render statement * Changed statement
2017-04-10API param to exclude notification types from response (#1341)Eugen
* Add exclude_types param to /api/v1/notifications * Exclude notification types in web UI through exclude_types in the API
2017-04-08Make public timelines API not require user context/app credentials (#1291)Eugen
* Make /api/v1/timelines/public and /api/v1/timelines/tag/:id public Fix #1156 - respect query params when generating pagination links in API * Apply pagination fix to more APIs
2017-03-30Add counter caches for a large performance increase on API requestsEugen Rochko
2017-02-25Add tuning documentation, add <content> tags back to most salmons,Eugen Rochko
make status pagination headers generation more lax about next page existing
2017-01-26Improve infinite scroll on notificationsEugen Rochko
2017-01-24API now respects ?limit param as long as it's within 2x default limitEugen Rochko
2017-01-23Add /api/v1/notifications/clear, non-existing link cards for statuses willEugen Rochko
now return empty hash instead of throwing a 404 error. When following, merge into timeline will filter statuses
2017-01-21Method to fetch a single notificationEugen Rochko
2016-12-26Follow requests send e-mail notifications, but are excluded from ↵Eugen Rochko
notifications API Better initial state for unlisted/nsfw toggles
2016-11-29Unify collection caching codeEugen Rochko
2016-11-25Remove stale entries from cache resultsEugen Rochko
2016-11-23Rename "publish" to "toot" in english locale, fix lightbox showing old imageEugen Rochko
before loading new one, cache notifications API, fix missing follow button on public profiles
2016-11-21Performance improvement for notifications APIEugen Rochko
2016-11-21Remove some n+1 queries from notifications APIEugen Rochko
2016-11-20Adding unified streamable notificationsEugen Rochko