Commit Graph

83 Commits (i18n/crowdin/translations)

Author SHA1 Message Date
Matt Jankowski 477412d62a
Use hash arguments to `select` when possible (Rails 7.2) (#32917) 1 month ago
Emelia Smith e02d23b549
Change `read:me` scope to `profile` scope (#30357)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
7 months ago
Matt Jankowski 85d9053b36
Move `pagination_params` into `API::BaseController` (#28845) 7 months ago
Matt Jankowski 65e82211cd
Rename `cache_*` methods to `preload_*` in controller concern (#30209) 8 months ago
Emelia Smith 049b159beb
Add read:me OAuth 2.0 scope, allowing more limited access to user data (#29087) 8 months ago
Matt Jankowski b5115850bb
Move repeated `insert_pagination_headers` method to api base class (#29606) 9 months ago
Matt Jankowski 9754967d5f
Move `pagination_max_id` and `pagination_since_id` into api/base controller (#28844) 10 months ago
Matt Jankowski eb1b8f69de
Allow pagination `Link` headers on API accounts/statuses when pinned true (#29442) 10 months ago
Matt Jankowski c0e8e457ab
Eager loading fixes for `api/` controllers (#28848) 11 months ago
Matt Jankowski 329911b0a3
Migrate controller->request spec for api/v1/follow* (#28811) 11 months ago
Claire 7d9b209fe8
Fix call to inefficient `delete_matched` cache method in domain blocks (#28374) 1 year ago
Claire 963354978a
Add `Account#unavailable?` and `Account#permanently_unavailable?` aliases (#28053) 1 year ago
Kevin Bongart 7877fcd83c
Deduplicate IDs in relationships and familiar_followers APIs (#27982) 1 year ago
Eugen Rochko d67bd44ca1
Add profile setup to onboarding in web UI (#27829) 1 year ago
Claire c451bbe249
Allow viewing and severing relationships with suspended accounts (#27667) 1 year ago
jsgoldstein 30c191aaa0
Add new public status index (#26344)
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
1 year ago
Eugen Rochko 6084461cd0
Change unauthenticated responses to be cached in REST API (#24348) 2 years ago
Eugen Rochko a9b5598c97
Change user settings to be stored in a more optimal way (#23630)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Nick Schonning e2a3ebb271
Autofix Rubocop Style/IfUnlessModifier (#23697) 2 years ago
Carl Schwan f33e22ae4c
Allow changing hide_collections setting with the api (#22790)
* Allow changing hide_collections setting with the api

This is currently only possible with app/controllers/settings/profiles_controller.rb
and is the only difference in the allowed parameter between the two controllers

* Fix the lint issue

* Use normal indent
2 years ago
trwnh 89e1974f30
Make account endorsements idempotent (fix #19045) (#20118)
* Make account endorsements idempotent (fix #19045)

* Accept suggestion to use exists? instead of find_by + nil check

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>

* fix logic (unless, not if)

* switch to using `find_or_create_by!`

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2 years ago
Eugen Rochko c99c106ef0
Change following and followers API to be accessible without being logged in (#18964) 2 years ago
Claire 9a3be0ad68
Fix error when looking handle with surrounding spaces (#18225) 3 years ago
Eugen Rochko 8f6c67bfde
Fix performance of account timelines (#17709)
* 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>
3 years ago
Eugen Rochko edf09ec747
Add `/api/v1/accounts/familiar_followers` to REST API (#17700)
* Add `/api/v1/accounts/familiar_followers` to REST API

* Change hide network preference to be stored consistently for local and remote accounts

* Add dummy classes to migration

* Apply suggestions from code review

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
3 years ago
Claire d5c9feb7b7
Add support for private pinned posts (#16954)
* Add support for private pinned toots

* Allow local user to pin private toots

* Change wording to avoid "direct message"
3 years ago
Eugen Rochko 7de0ee7aba
Remove Keybase integration (#17045) 3 years ago
abcang d0fc69d721
Further improve the media attached status query for accounts (#16106) 4 years ago
abcang 1f47511023
Improve media attached status query (#16105) 4 years ago
Eugen Rochko e31ed27485
Add `GET /api/v1/accounts/lookup` REST API (#15740) 4 years ago
trwnh 4950e59cdc
Use existing FeaturedTag serializer and delete AccountFeaturedTag serializer (#15415)
* Update featured_tags_controller.rb

* Update featured_tag_serializer.rb

* Update featured_tag_serializer.rb

* Delete account_featured_tag_serializer.rb

* please codeclimate

* please codeclimate
4 years ago
Takeshi Umeda 44d5c6bc8f
Fix incorrect conditions for suspended accounts in Get API for account featured tags (#15270) 4 years ago
Eugen Rochko e6b272e5c9
Change REST API to return empty data for suspended accounts (#14765) 4 years ago
Takeshi Umeda 33ad850c98
Added account featured tags API (#11817) 4 years ago
Akihiko Odaki 64ef37b89d
Introduce ApplicationController#cache_collection_paginated_by_id (#14677)
* 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 6da24aad4c.

* 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.
4 years ago
Akihiko Odaki e26e7a1cb5
Replace incorrect use of distinct with group (#14675)
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 6da24aad4c.
4 years ago
ThibG 65506bac3f
Add user notes on accounts (#14148)
* Add UserNote model

* Add UI for user notes

* Put comment in relationships entity

* Add API to create user notes

* Copy user notes to new account when receiving a Move activity

* Address some of the review remarks

* Replace modal by inline edition

* Please CodeClimate

* Button design changes

* Change design again

* Cancel note edition when pressing Escape

* Fixes

* Tweak design again

* Move “Add note” item, and allow users to add notes to themselves

* Rename UserNote into AccountNote, rename “comment” Relationship attribute to “note”
5 years ago
ThibG f1e0fa80f6
Fix own following/followers not showing muted users (#13614)
Fixes #13612
5 years ago
ThibG b154428e14
Add federation support for the "hide network" preference (#11673)
* Change ActivityPub follower/following collections to not link first page

* Add support for hiding followers and following of remote users

* Switch to using a single `hide_collections` column

* Address code style remarks
5 years ago
Eugen Rochko 0ae5c6312f
Remove useless `respond_to` calls (#13208) 5 years ago
ThibG 3b3bdc7293 Hide blocked users from more places (#12733)
* Hide blocked, muted, and blocked-by users from toot favourite lists

* Hide blocked, muted, and blocked-by users from toot reblog lists

* Hide blocked, muted, and blocked-by users from followers/following (API)

* Fix tests

* Hide blocked, muted, and blocked-by users from followers/following on public pages
5 years ago
Eugen Rochko 2999c95596
Fix error when fetching followers/following from REST API when user has network hidden (#12716)
Fix #12510
5 years ago
Jennifer Glauche fd93a9c871 make it not return http 400 when passing and empty source argument (#12259)
* make it not return http 400 when passing and empty source argument

* create a spec for the empty source hash bug

* compact checks for nil, empty? parameters

* use nil.blank? instead checking for nil
5 years ago
abcang 059945c97c Improve status pin query (#11972) 5 years ago
Eugen Rochko 70ae77895f
Fix error in REST API for an account's statuses (#11700) 5 years ago
Eugen Rochko 699db454c3
Fix pinned statuses API returning pagination headers (#11526)
Fix #10227
5 years ago
Eugen Rochko 67b3b62b98
Improve blocked view of profiles (#10491)
* Revert "Fix filtering of favourited_by, reblogged_by, followers and following (#10447)"

This reverts commit 120544067f.

* Revert "Hide blocking accounts from blocked users (#10442)"

This reverts commit 62bafa20a1.

* 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
6 years ago
ThibG 62bafa20a1 Hide blocking accounts from blocked users (#10442)
* Revert "Add indication that you have been blocked in web UI (#10420)"

This reverts commit bd02ec6daa.

* Revert "Add `blocked_by` relationship to the REST API (#10373)"

This reverts commit 9745de883b.

* 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 bd02ec6daa

* Refactor by adding `without_blocking` scope
6 years ago
Alex Gessner 69141dca26 squashed identity proof updates (#10375) 6 years ago
Eugen Rochko 06663fcf87
Fix `tagged` param not being normalized before querying tags (#10249) 6 years ago