about summary refs log tree commit diff
path: root/spec/controllers
AgeCommit message (Collapse)Author
2018-03-09Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-03-05Redirect from Web tag timeline to public tag timeline if not signed in (#6633)Akihiko Odaki
This is also implemented in Pawoo: https://github.com/pixiv/mastodon/commit/ceafdbd1bbf30fe20a2a814df0f8cae429a4e9db
2018-03-04Set the default locale in config (#6580)Akihiko Odaki
Previously the default locale was set by Localized concern for controllers, but it was not enforced for mailers. config is enforced throughout the application and an appropriate place to set the default locale.
2018-02-23Merge branch 'master' of https://github.com/tootsuite/mastodonimncls
# Conflicts: # app/controllers/settings/exports_controller.rb # app/models/media_attachment.rb # app/models/status.rb # app/views/about/show.html.haml # docker_entrypoint.sh # spec/views/about/show.html.haml_spec.rb
2018-02-21Fix bug in relationships API introduced by #6482 (#6527)Eugen Rochko
It was merge when it needed to be deep_merge. And added some tests
2018-02-08Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-02-08Fix response of signature_verification_failure_reason (#6441)abcang
2018-01-24Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-01-22Rename ResolveRemoteAccountService to ResolveAccountService (#6327)Akihiko Odaki
The service used to be named ResolveRemoteAccountService resolves local accounts as well.
2018-01-21Merge remote-tracking branch 'origin/master' into merge-upstreamDavid Yip
Conflicts: app/controllers/settings/two_factor_authentication/confirmations_controller.rb
2018-01-21Redirect to 2FA creation page when otp_secret is not available (#6314)Aboobacker MK
2018-01-19Merge remote-tracking branch 'origin/master' into merge-upstreamDavid Yip
Conflicts: app/javascript/styles/mastodon/components.scss app/javascript/styles/mastodon/modal.scss
2018-01-18Fix regeneration marker not expiring (#6290)Eugen Rochko
* Fix regeneration key not getting expired * Add rake task to remove old regeneration markers
2018-01-17Merge remote-tracking branch 'origin/master' into merge-upstreamDavid Yip
Conflicts: app/javascript/styles/mastodon/components.scss
2018-01-17Fix home regeneration (#6251)Eugen Rochko
* Fix regeneration marker not being removed after completion * Return HTTP 206 from /api/v1/timelines/home if regeneration in progress Prioritize RegenerationWorker by putting it into default queue * Display loading indicator and poll home timeline while it regenerates * Add graphic to regeneration message * Make "not found" indicator consistent with home regeneration
2018-01-10Thank you, Officer MurphyDavid Yip
2018-01-10Add examples based on errors seen in #317David Yip
2018-01-08Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-01-08Revert #5772 (#6221)Eugen Rochko
2018-01-07Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-01-07Fix force_ssl conditional (#6201)Yamagishi Kazutoshi
2018-01-04Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-01-05Fix email confirmation link not updating email (#6187)Patrick Figel
A change introduced in #6125 prevents `Devise::Models::Confirmable#confirm` from being called for existing users, which in turn leads to `email` not being set to `unconfirmed_email`, breaking email updates. This also adds a test that would've caught this issue.
2018-01-03Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-01-03Allow to dereference Follow object for ActivityPub (#5772)Akihiko Odaki
* Allow to dereference Follow object for ActivityPub * Accept IRI as object representation for Accept activity
2017-12-12Merge remote-tracking branch 'tootsuite/master' into merge-upstreamDavid Yip
2017-12-12Fix #5953 - Add GET /api/v1/accounts/:id/lists (#5983)Eugen Rochko
2017-12-09Rate limit by user instead of IP when API user is authenticated (#5923)Eugen Rochko
* Fix #668 - Rate limit by user instead of IP when API user is authenticated * Fix code style issue * Use request decorator provided by Doorkeeper
2017-12-09Keep WebPush settings (#5879)abcang
2017-12-06Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2017-12-06Break out nested relationship API keys (#5887)aschmitz
* Break out nested relationship API keys This closes #5856 by restoring the existing behavior of the `muting` and `following` keys (returning booleans rather than truthy or false). It adds `showing_reblogs` and `muting_notifications` keys: * `showing_reblogs` returns true if: 1. You've requested to follow the user, with reblogs shown, or 2. You are following the user, with reblogs shown. * `muting_notifications` returns true if you have muted the user and their notifications as well. * Rubocop fix * Fix pulling reblog/mute status from relationships I could swear this had passed tests before, but apparently not. Works now. * More test fixes Really, you'd expect this to be more straightforward.
2017-11-28Allow hiding of reblogs from followed users (#5762)aschmitz
* Allow hiding of reblogs from followed users This adds a new entry to the account menu to allow users to hide future reblogs from a user (and then if they've done that, to show future reblogs instead). This does not remove or add historical reblogs from/to the user's timeline; it only affects new statuses. The API for this operates by sending a "reblogs" key to the follow endpoint. If this is sent when starting a new follow, it will be respected from the beginning of the follow relationship (even if the follow request must be approved by the followee). If this is sent when a follow relationship already exists, it will simply update the existing follow relationship. As with the notification muting, this will now return an object ({reblogs: [true|false]}) or false for each follow relationship when requesting relationship information for an account. This should cause few issues due to an object being truthy in many languages, but some modifications may need to be made in pickier languages. Database changes: adds a show_reblogs column (default true, non-nullable) to the follows and follow_requests tables. Because these are non-nullable, we use the existing MigrationHelpers to perform this change without locking those tables, although the tables are likely to be small anyway. Tests included. See also <https://github.com/glitch-soc/mastodon/pull/212>. * Rubocop fixes * Code review changes * Test fixes This patchset closes #648 and resolves #3271. * Rubocop fix * Revert reblogs defaulting in argument, fix tests It turns out we needed this for the same reason we needed it in muting: if nil gets passed in somehow (most usually by an API client not passing any value), we need to detect and handle it. We could specify a default in the parameter and then also catch nil, but there's no great reason to duplicate the default value.
2017-11-17Merge remote-tracking branch 'origin/master' into merge-upstreamDavid Yip
2017-11-18Lists (#5703)Eugen Rochko
* Add structure for lists * Add list timeline streaming API * Add list APIs, bind list-account relation to follow relation * Add API for adding/removing accounts from lists * Add pagination to lists API * Add pagination to list accounts API * Adjust scopes for new APIs - Creating and modifying lists merely requires "write" scope - Fetching information about lists merely requires "read" scope * Add test for wrong user context on list timeline * Clean up tests
2017-11-16Merge remote-tracking branch 'origin/master' into gs-masterDavid Yip
2017-11-17Remove empty strings (#5732)ysksn
2017-11-16Merge tootsuite/master at 30237259367a0ef2b20908518b86bbeb358999b5Surinna Curtis
2017-11-15Optional notification muting (#5087)Surinna Curtis
* Add a hide_notifications column to mutes * Add muting_notifications? and a notifications argument to mute! * block notifications in notify_service from hard muted accounts * Add specs for how mute! interacts with muting_notifications? * specs testing that hide_notifications in mutes actually hides notifications * Add support for muting notifications in MuteService * API support for muting notifications (and specs) * Less gross passing of notifications flag * Break out a separate mute modal with a hide-notifications checkbox. * Convert profile header mute to use mute modal * Satisfy eslint. * specs for MuteService notifications params * add trailing newlines to files for Pork :) * Put the label for the hide notifications checkbox in a label element. * Add a /api/v1/mutes/details route that just returns the array of mutes. * Define a serializer for /api/v1/mutes/details * Add more specs for the /api/v1/mutes/details endpoint * Expose whether a mute hides notifications in the api/v1/relationships endpoint * Show whether muted users' notifications are muted in account lists * Allow modifying the hide_notifications of a mute with the /api/v1/accounts/:id/mute endpoint * make the hide/unhide notifications buttons work * satisfy eslint * In probably dead code, replace a dispatch of muteAccount that was skipping the modal with launching the mute modal. * fix a missing import * add an explanatory comment to AccountInteractions * Refactor handling of default params for muting to make code cleaner * minor code style fixes oops * Fixed a typo that was breaking the account mute API endpoint * Apply white-space: nowrap to account relationships icons * Fix code style issues * Remove superfluous blank line * Rename /api/v1/mutes/details -> /api/v2/mutes * Don't serialize "account" in MuteSerializer Doing so is somewhat unnecessary since it's always the current user's account. * Fix wrong variable name in api/v2/mutes * Use Toggle in place of checkbox in the mute modal. * Make the Toggle in the mute modal look better * Code style changes in specs and removed an extra space * Code review suggestions from akihikodaki Also fixed a syntax error in tests for AccountInteractions. * Make AddHideNotificationsToMute Concurrent It's not clear how much this will benefit instances in practice, as the number of mutes tends to be pretty small, but this should prevent any blocking migrations nonetheless. * Fix up migration things * Remove /api/v2/mutes
2017-11-10Per-user reblog hiding implementation/fixes/testsaschmitz
Note that this will only hide/show *future* reblogs by a user, and does nothing to remove/add reblogs that are already in the timeline. I don't think that's a particularly confusing behavior, and it's a lot easier to implement (similar to mutes, I believe).
2017-11-09Rewrite account_controller_spec (#5633)Nanamachi
* make accounts_controller_spec DRY * Add blocked user spec
2017-10-21Set up /settings/keyword_mutes. #164.David Yip
This should eventually be accessible via the API and the web frontend, but I find it easier to set up an editing interface using Rails templates and the like. We can always take it out if it turns out we don't need it.
2017-10-16Merge remote-tracking branch 'origin/master' into gs-masterDavid Yip
2017-10-13Improve spec of Feed and UserTrackingConcern (#5367)Eugen Rochko
2017-10-11Merge upstream 2.0ish #165kibigo!
2017-10-09Fix pagination in Api::V1::BlocksController (#5285)Akihiko Odaki
2017-10-07Add moderation note (#5240)nullkal
* Add moderation note * Add frozen_string_literal * Make rspec pass
2017-10-07Redesign public hashtag pages (#5237)Eugen Rochko
2017-10-04Implement EmailBlackList (#5109)utam0k
* Implement BlacklistedEmailDomain * Use Faker::Internet.domain_name * Remove note column * Add frozen_string_literal comment * Delete unnecessary codes * Sort alphabetically * Change of wording * Rename BlacklistedEmailDomain to EmailDomainBlock
2017-10-04Separate notifications preferences from general preferences (#4447)Yamagishi Kazutoshi
* Separate notifications preferences from general preferences * Refine settings/notifications/show * remove preferences.notifications
2017-10-03Fix HTTP responses for salmon and ActivityPub inbox processing (#5200)ThibG
* Return sensible HTTP status for ActivityPub inbox processing * Return sensible HTTP status for salmon slap processing * Return additional information to debug signature verification failures