Commit Graph

17 Commits (aca7fdabbbe7d714c11f313cd8c409f780bc5e3a)

Author SHA1 Message Date
Eugen Rochko c84c30c542 Improve blocked view of profiles ()
* Revert "Fix filtering of favourited_by, reblogged_by, followers and following ()"

This reverts commit 0317f37c6f.

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

This reverts commit 4cd944d364.

* 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-07 04:59:13 +02:00
ThibG 4cd944d364 Hide blocking accounts from blocked users ()
* Revert "Add indication that you have been blocked in web UI ()"

This reverts commit d31affe69b.

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

This reverts commit a8bb10633d.

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

* Refactor by adding `without_blocking` scope
2019-04-01 20:06:13 +02:00
Eugen Rochko 5ff943716e Fix `tagged` param not being normalized before querying tags () 2019-03-13 13:02:13 +01:00
abcang affb8b1de9 Improve account media query () 2019-02-26 15:23:24 +01:00
Eugen Rochko d2d4d38f22 Add featured hashtags to profiles ()
* 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
2019-02-04 04:25:59 +01:00
Eugen Rochko d70d8321d3 Add exclude_reblogs option to account statuses API ()
Fix 
2018-12-27 03:42:35 +01:00
Eugen Rochko ae8c6b892f Allow unauthenticated REST API access to GET /api/v1/accounts/:id/statuses ()
Fix 

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-12-20 01:30:43 +01:00
Eugen Rochko 5ddcdf3753 Support min_id-based pagination in REST API ()
* 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-09-28 02:23:45 +02:00
Eugen Rochko 34fdf77f48 Add more granular OAuth scopes ()
* 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-07-05 18:31:35 +02:00
Akihiko Odaki a81b1e6f10 Do not use permitted_for scope when querying pinned statuses ()
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-05-16 12:30:14 +02:00
Eugen Rochko 10fc551576 Fix unpermitted parameters warning when generating pagination URLs () 2018-04-02 02:09:50 +02:00
abcang f25dfde752 Improve performance of account_media_status_ids () 2018-03-10 17:44:26 +01:00
Eugen Rochko f410afe59e Ensure that boolean params in the API are parsed for truthiness ()
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.
2018-03-01 02:47:59 +01:00
Eugen Rochko 3e20cb7025 Pinned statuses ()
* Pinned statuses

* yarn manage:translations
2017-08-25 01:41:18 +02:00
Eugen Rochko 20e15ecfb3 Refactor JSON templates to be generated with ActiveModelSerializers instead of Rabl () 2017-07-07 04:02:06 +02:00
Matt Jankowski 76f986d07b Clean up for api/base controller ()
* Move ApiController to Api/BaseController

* API controllers inherit from Api::BaseController

* Add coverage for various error cases in api/base controller
2017-06-07 20:09:25 +02:00
Matt Jankowski 1066fd1ab5 Spec coverage and refactor for the api/v1/accounts controllers () 2017-05-31 21:36:24 +02:00