about summary refs log tree commit diff
path: root/app/controllers/api/v1
AgeCommit message (Collapse)Author
2017-09-11Fix error when following locked accounts (#4896)Eugen Rochko
2017-09-10Merge tag 'v1.6.0' into sync/upstreamDavid Yip
2017-09-10Fix POST /api/v1/follows error when already following (#4878)Eugen Rochko
2017-09-09Merge tag 'v1.6.0rc3' into sync/upstreamDavid Yip
2017-09-09Merge branch 'origin/master' into sync/upstreamDavid Yip
Conflicts: app/javascript/mastodon/components/status_list.js app/javascript/mastodon/features/notifications/index.js app/javascript/mastodon/features/ui/components/modal_root.js app/javascript/mastodon/features/ui/components/onboarding_modal.js app/javascript/mastodon/features/ui/index.js app/javascript/styles/about.scss app/javascript/styles/accounts.scss app/javascript/styles/components.scss app/presenters/instance_presenter.rb app/services/post_status_service.rb app/services/reblog_service.rb app/views/about/more.html.haml app/views/about/show.html.haml app/views/accounts/_header.html.haml config/webpack/loaders/babel.js spec/controllers/api/v1/accounts/credentials_controller_spec.rb
2017-09-05Fix #4794 - Fake instant follow in API response when account is believed ↵Eugen Rochko
unlocked (#4799)
2017-09-01Make PreviewCard records reuseable between statuses (#4642)Eugen Rochko
* 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
2017-08-26authorize-follow-requests-after-unlocking (#4658)masarakki
2017-08-25Pinned statuses (#4675)Eugen Rochko
* Pinned statuses * yarn manage:translations
2017-08-21Fix #4637 - Re-add missing doorkeeper_authorize for ↵Eugen Rochko
/api/v1/verify_credentials (#4650)
2017-08-13ActivityPub delivery (#4566)Eugen Rochko
* Deliver ActivityPub Like * Deliver ActivityPub Undo-Like * Deliver ActivityPub Create/Announce activities * Deliver ActivityPub creates from mentions * Deliver ActivityPub Block/Undo-Block * Deliver ActivityPub Accept/Reject-Follow * Deliver ActivityPub Undo-Follow * Deliver ActivityPub Follow * Deliver ActivityPub Delete activities Incidentally fix #889 * Adjust BatchedRemoveStatusService for ActivityPub * Add tests for ActivityPub workers * Add tests for FollowService * Add tests for FavouriteService, UnfollowService and PostStatusService * Add tests for ReblogService, BlockService, UnblockService, ProcessMentionsService * Add tests for AuthorizeFollowService, RejectFollowService, RemoveStatusService * Add tests for BatchedRemoveStatusService * Deliver updates to a local account to ActivityPub followers * Minor adjustments
2017-07-25Merge git://github.com/tootsuite/mastodon into tootsuite-masterOndřej Hruška
2017-07-25Merge queries in Api::V1::FavouritesController (#4359)Akihiko Odaki
2017-07-21New notification cleaning mode (#89)Ondřej Hruška
This PR adds a new notification cleaning mode, super perfectly tuned for accessibility, and removes the previous notification cleaning functionality as it's now redundant. * w.i.p. notif clearing mode * Better CSS for selected notification and shorter text if Stretch is off * wip for rebase ~ * all working in notif clearing mode, except the actual removal * bulk delete route for piggo * cleaning + refactor. endpoint gives 422 for some reason * formatting * use the right route * fix broken destroy_multiple * load more notifs after succ cleaning * satisfy eslint * Removed CSS for the old notif delete button * Tabindex=0 is mandatory In order to make it possible to tab to this element you must have tab index = 0. Removing this violates WCAG and makes it impossible to use the interface without good eyesight and a mouse. So nobody with certain mobility impairments, vision impairments, or brain injuries would be able to use this feature if you don't have tabindex=0 * Corrected aria-label Previous label implied a different behavior from what actually happens * aria role localization & made the overlay behave like a checkbox * checkboxes css and better contrast * color tuning for the notif overlay * fanceh checkboxes etc and nice backgrounds * SHUT UP TRAVIS
2017-07-15Merge upstream (#81)kibigo!
2017-07-15Raise search results count to 10 for testOndřej Hruška
reference: https://mastodon.xyz/users/lx/updates/278054
2017-07-14Fix response of unreblog/unfavourite APIs (#4204)unarist
Both APIs process asynchronously, so reblogged/favourited fields in the response should be set to `false` manually.
2017-07-14Added buttons and menu items to dismiss individual notifications (#76)Ondřej Hruška
* Added DELETE verb for notifications * Added notification dismiss button to status dropdown * Added reveal-on-hover notif dismiss button, added FollowNotification component
2017-07-11Fix #3462 - Require authentication for search API (#4155)Eugen Rochko
This makes it consistent with /api/v1/accounts/search and previous behaviour has been an oversight.
2017-07-10Add attribute for default privacy to verify credentials (#4075)Yamagishi Kazutoshi
* Add attribute for default privacy to verify credentials * add raw_note * source
2017-07-07Refactor JSON templates to be generated with ActiveModelSerializers instead ↵Eugen Rochko
of Rabl (#4090)
2017-06-27Fix #1624 - Send e-mail notifications to admins about new reports (#3949)Eugen Rochko
2017-06-10Move create/destroy actions for api/v1/statuses to namespace (#3678)Matt Jankowski
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
2017-06-09Move reblogged_by and favourited_by actions out of api/v1/statuses and into ↵Matt Jankowski
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
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-06-05Redirect to streaming_api_base_url (#3579)Daigo 3 Dango
* Redirect to streaming_api_base_url When Rails receives a request to streaming API, it most likely means that there is another host which is configured to respond to it. This is to redirect clients to that host if `STREAMING_API_BASE_URL` is set as another host. * Use the new Ruby 1.9 hash syntax
2017-06-04Fix limit_param in favourites_controller.rb (#3553)Naoki Kosaka
2017-05-31Spec coverage and refactor for the api/v1/accounts controllers (#3451)Matt Jankowski
2017-05-31Improve spec coverage and clean up api/v1/blocks controller (#3464)Matt Jankowski
2017-05-31Improve spec coverage and clean up api/v1/follow_requests controller (#3465)Matt Jankowski
2017-05-31Improve spec coverage and clean up api/v1/domain_blocks controller (#3466)Matt Jankowski
2017-05-31Refactor api/v1/notifications controller (#3470)Matt Jankowski
2017-05-31Improve spec coverage and clean up api/v1/favourites controller (#3472)Matt Jankowski
2017-05-31Improve spec coverage and clean up api/v1/mutes controller (#3481)Matt Jankowski
2017-05-31Refactor and spec coverage for api/v1/timelines actions (#3482)Matt Jankowski
2017-05-30Refactor api/v1/apps controller (#3471)Matt Jankowski
2017-05-30Refactor api/v1/reports controller (#3469)Matt Jankowski
2017-05-30Refactor api/v1/search controller (#3468)Matt Jankowski
2017-05-30Improve spec coverage and clean up api/v1/media controller (#3467)Matt Jankowski
2017-05-30Add status destroy authorization to policy (#3453)Jack Jennings
* Add status destroy authorization to policy * Create explicit unreblog status authorization
2017-05-29Extract authorization policy for viewing statuses (#3150)Jack Jennings
2017-05-25More use of next link header on account (media) timelines (#3311)unarist
This will reduce requests on who have only few statuses. - Use next link header to detect more items from first request - Omit next link header if result items are fewer than requested count (It had omit it only if result was empty before)
2017-05-23Fix following/followers API to return correct link headers (#3268)unarist
Link headers in following/followers API should include follow_id as max_id/since_id. However, these API use current_user's account_id instead of follow_id from #3167. This causes irrelevant result on loading more users.
2017-05-23Refactor of API timeline actions (#3263)Matt Jankowski
- Increase coverage to exercise all parts of each action - Move into namespace to share common code - Misc refactor of each action for smaller methods, simpler code
2017-05-21Fix mutes_controller error and incorrect statuses_controller report (#3202)Akihiko Odaki
This commit fixes a regression in commit f55480756337dd4df7513e89673e81e003f1201a.
2017-05-20Fix regressions in api/v1 (#3178)Akihiko Odaki
The regressions are introduced at commit f55480756337dd4df7513e89673e81e003f1201a by me (Akihiko Odaki)
2017-05-20Fix block list 500 (#3174)Yamagishi Kazutoshi
2017-05-20Use joins for account properties (#3167)Akihiko Odaki
2017-05-19Add buttons to block and unblock domain (#3127)Eugen Rochko
* Add buttons to block and unblock domain * Relationship API now returns "domain_blocking" status for accounts, rename "block entire domain" to "hide entire domain", fix unblocking domain, do not block notifications from domain-blocked-but-followed people, do not send Salmons to domain blocked users * Add test * Personal domain blocks shouldn't affect Salmon after all, since in this direction of communication the control is very thin when it comes to public stuff. Best stay consistent and not affect federation in this way * Ignore followers and follow request from domain blocked folks, ensure account domain blocks are not created for empty domain, and avoid duplicates in validation * Purge followers when blocking domain (without soft-blocks, since they are useless here) * Add tests, fix local timeline being empty when having any domain blocks