Commit Graph

99 Commits (4b42fe6aba3b0e2315c560605a0cea459128e2ea)

Author SHA1 Message Date
Claire 4b42fe6aba
Change API behavior of reblogs wrt. quotes for consistency (#36559) 3 weeks ago
Claire e1f7847b64
Remove the `outgoing_quotes` feature flag, making the feature unconditional (#36130) 2 months ago
Claire 2648bbdc51
Add `PUT /api/v1/statuses/:status_id/interaction_policy` (#35769) 3 months ago
Claire 9ec99ffef1
Add `quote_approval_policy` parameter when posting and editing statuses (#35699) 3 months ago
Eugen Rochko 8cf7a77808
Fix async refresh never being finished when status cannot be fetched (#35500) 4 months ago
Claire 5a88b7f683
Add experimental basic quote post authoring (#35355) 4 months ago
Eugen Rochko 14a781fa24
Add button to load new replies in web UI (#35210) 4 months ago
Jonny Saunders 46e13dd81c
Add Fetch All Replies Part 1: Backend (#32615)
Signed-off-by: sneakers-the-rat <sneakers-the-rat@protonmail.com>
Co-authored-by: jonny <j@nny.fyi>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Co-authored-by: Kouhai <66407198+kouhaidev@users.noreply.github.com>
8 months ago
Claire e71fb450e0
Add optional `delete_media` parameter to `DELETE /api/v1/statuses/:id` (#33988) 9 months ago
Matt Jankowski 85d9053b36
Move `pagination_params` into `API::BaseController` (#28845) 1 year ago
Claire 36fe8f8566
Change `ids` param to `id` in `/api/v1/statuses` and `/api/v1/accounts` for consistency (#30465) 1 year ago
Matt Jankowski 65e82211cd
Rename `cache_*` methods to `preload_*` in controller concern (#30209) 2 years ago
Claire 2fe1b8d169
Add API to get multiple accounts and statuses (#27871)
Co-authored-by: noellabo <noel.yoshiba@gmail.com>
2 years ago
Matt Jankowski 2f19ddd1fa
Move status serializer error handling to private method (#29031) 2 years ago
Matt Jankowski 93a5b3f9df
Move status serializer chooser to private method (#29030) 2 years ago
Eugen Rochko 6084461cd0
Change unauthenticated responses to be cached in REST API (#24348) 3 years ago
Claire d6930b3847
Add API parameter to safeguard unexpect mentions in new posts (#18350) 3 years ago
Claire 4b92e59f4f
Add support for editing media description and focus point of already-posted statuses (#20878)
* Add backend support for editing media attachments of existing posts

* Allow editing media attachments of already-posted toots

* Add tests
3 years ago
Claire 86f6631d28
Remove dead code and refactor status threading code (#20357)
* Remove dead code

* Remove unneeded/broken parameters and refactor descendant computation
3 years ago
Claire 1615c3eb6e
Change logged out /api/v1/statuses/:id/context logged out limits (#20355) 3 years ago
Claire c2170991c7
Fix reblogs being discarded after the reblogged status (#19731) 3 years ago
Eugen Rochko 5724da0780
Fix language not being saved when editing status (#19543)
Fix #19542
3 years ago
Claire cedcece0cc
Fix deleted pinned posts potentially counting towards the pinned posts limit (#19005)
Fixes #18938
3 years ago
Claire 3906dd67ed
Fix extremely rare race condition when deleting a toot or account (#17994) 4 years ago
Eugen Rochko b2cd34474b
Add rate limit for editing (#17728) 4 years ago
Eugen Rochko e24b14cc74
Fix leak of existence of otherwise inaccessible statuses in REST API (#17684) 4 years ago
Eugen Rochko 63002cde03
Add editing for published statuses (#17320)
* Add editing for published statuses

* Fix change of multiple-choice boolean in poll not resetting votes

* Remove the ability to update existing media attachments for now
4 years ago
Claire 03d59340da
Fix Sidekiq warnings about JSON serialization (#17381)
* Fix Sidekiq warnings about JSON serialization

This occurs on every symbol argument we pass, and every symbol key in hashes,
because Sidekiq expects strings instead.

See https://github.com/mperham/sidekiq/pull/5071

We do not need to change how workers parse their arguments because this has
not changed and we were already converting to symbols adequately or using
`with_indifferent_access`.

* Set Sidekiq to raise on unsafe arguments in test mode

In order to more easily catch issues that would produce warnings in production
code.
4 years ago
Ariel 2ada2ae18a
Fix/14021 behaviour on add or remove toots (#14212)
* Add toot send by current user at local state after send a new toot

Related to #14021

* Decrement toot counter at profile when remove a toot

Related to #14021

* Remove semicolon at end of line
5 years ago
Eugen Rochko 988b0493fe
Add more tests for ActivityPub controllers (#13585) 6 years ago
ThibG 0d117c106a
Fix 404 and 410 API errors being silently discarded in WebUI (#13279)
* Fix 404 and 410 API errors being silently discarded in WebUI

Fixes #13278

* Return more appropriate error when user replies to a deleted toot

* Please CodeClimate

* Fix 404/410 errors on fetching account timelines & identity proofs

* Refactor error handling

* Move error message string to statuses.errors
6 years ago
Eugen Rochko 339ce1c4e9
Add specific rate limits for posting and following (#13172) 6 years ago
Eugen Rochko 0ae5c6312f
Remove useless `respond_to` calls (#13208) 6 years ago
Eugen Rochko 282ea17078
Add soft delete for statuses for instant deletes through API (#11623)
* Add soft delete for statuses to allow them to appear instant

* Allow reporting soft-deleted statuses and show them in the admin UI

* Change index for getting an account's statuses
6 years ago
Eugen Rochko 97192d9a77
Fix remote and staff-removed statuses leaving media behind for a day (#11638)
The reason for unattaching media instead of removing it is to support
delete & redraft functionality, but remote or staff-removed statuses
will never be redrafted, so the media should be deleted immediately
6 years ago
Eugen Rochko 0c1b1069c9
Remove deprecated REST API `GET /api/v1/statuses/:id/card` (#11213) 6 years ago
ThibG 6d44f2441b Add toot source to delete result to ease Delete & Redraft (#10669)
* Return Status with raw text in raw_content when deleting a status

* Use raw content if available on delete & redraft

* Rename raw_content to text; do not serialize formatted content when source is requested
7 years ago
Eugen Rochko 230a012f00
Add polls (#10111)
* Add polls

Fix #1629

* Add tests

* Fixes

* Change API for creating polls

* Use name instead of content for votes

* Remove poll validation for remote polls

* Add polls to public pages

* When updating the poll, update options just in case they were changed

* Fix public pages showing both poll and other media
7 years ago
Eugen Rochko a49d43d112
Add scheduled statuses (#9706)
Fix #340
7 years ago
abcang 9e75aa30cd Unuse ActiveRecord::Base#cache_key (#8185)
* Unuse ActiveRecord::Base#cache_key

* Enable cache_versioning

* Call cache_collection
7 years ago
Eugen Rochko 1f6ed4f86a
Add more granular OAuth scopes (#7929)
* 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
7 years ago
Eugen Rochko 05f8c375a2
Remove small pagination limit from context API (#7564)
Fix #7557
8 years ago
Akihiko Odaki 1258efa882 Paginate descendant statuses in public page (#7148) 8 years ago
Akihiko Odaki 519119f657 Paginate ancestor statuses in public page (#7102)
This also limits the statuses returned by API, but pagination is not
implemented in Web API yet. I still expect it brings user experience
better than making a user wait to fetch all ancestor statuses and flooding
the column with them.
8 years ago
Eugen Rochko 33513753b9
Fix unpermitted parameters warning when generating pagination URLs (#6995) 8 years ago
Eugen Rochko 7dc5035031 Make PreviewCard records reuseable between statuses (#4642)
* Make PreviewCard records reuseable between statuses

**Warning!** Migration truncates preview_cards tablec

* Allow a wider thumbnail for link preview, display it in horizontal layout (#4648)

* Delete preview cards files before truncating

* Rename old table instead of truncating it

* Add mastodon:maintenance:remove_deprecated_preview_cards

* Ignore deprecated_preview_cards in schema definition

* Fix null behaviour
8 years ago
Eugen Rochko 8b2cad5637 Refactor JSON templates to be generated with ActiveModelSerializers instead of Rabl (#4090) 8 years ago
Matt Jankowski 2925372ff4 Move create/destroy actions for api/v1/statuses to namespace (#3678)
Each of mute, favourite, reblog has been updated to:

- Have a separate controller with just a create and destroy action
- Preserve historical route names to not break the API
- Mild refactoring to break up long methods
9 years ago
Matt Jankowski 5282ba862a Move reblogged_by and favourited_by actions out of api/v1/statuses and into unique controllers (#3646)
* Add specs for api statuses routes

* Update favourited_by and reblogged_by api routes

* Move methods into new controllers

* Use load_accounts methods to simplify index actions

* Clean up load_accounts methods

* Clean up link header generation

* Check for link headers in specs

* Remove unused actions from api/v1/statuses controller

* Remove specs for moved actions
9 years ago
Matt Jankowski 73540ffe6b Clean up for api/base controller (#3629)
* Move ApiController to Api/BaseController

* API controllers inherit from Api::BaseController

* Add coverage for various error cases in api/base controller
9 years ago