Skip to content
Snippets Groups Projects
  1. Jan 07, 2019
  2. Dec 24, 2018
    • Eugen Rochko's avatar
      Add REST API for creating an account (#9572) · 5d2fc6de
      Eugen Rochko authored
      * Add REST API for creating an account
      
      The method is available to apps with a token obtained via the client
      credentials grant. It creates a user and account records, as well as
      an access token for the app that initiated the request. The user is
      unconfirmed, and an e-mail is sent as usual.
      
      The method returns the access token, which the app should save for
      later. The REST API is not available to users with unconfirmed
      accounts, so the app must be smart to wait for the user to click a
      link in their e-mail inbox.
      
      The method is rate-limited by IP to 5 requests per 30 minutes.
      
      * Redirect users back to app from confirmation if they were created with an app
      
      * Add tests
      
      * Return 403 on the method if registrations are not open
      
      * Require agreement param to be true in the API when creating an account
      Unverified
      5d2fc6de
  3. Nov 08, 2018
    • Eugen Rochko's avatar
      Optimize the process of following someone (#9220) · 6d59dfa1
      Eugen Rochko authored
      * Eliminate extra accounts select query from FollowService
      
      * Optimistically update follow state in web UI and hide loading bar
      
      Fix #6205
      
      * Asynchronize NotifyService in FollowService
      
      And fix failing test
      
      * Skip Webfinger resolve routine when called from FollowService if possible
      
      If an account is ActivityPub, then webfinger re-resolving is not necessary
      when called from FollowService. Improve options of ResolveAccountService
      Unverified
      6d59dfa1
  4. Jul 05, 2018
    • Eugen Rochko's avatar
      Add more granular OAuth scopes (#7929) · 1f6ed4f8
      Eugen Rochko authored
      * 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
      Unverified
      1f6ed4f8
  5. Apr 30, 2018
  6. Mar 01, 2018
  7. Dec 06, 2017
  8. Nov 28, 2017
    • aschmitz's avatar
      Allow hiding of reblogs from followed users (#5762) · eeaec398
      aschmitz authored
      * 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.
      eeaec398
  9. Nov 15, 2017
    • Surinna Curtis's avatar
      Optional notification muting (#5087) · 031a5a8f
      Surinna Curtis authored
      * 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
      031a5a8f
  10. Sep 11, 2017
  11. Sep 05, 2017
  12. Jul 07, 2017
  13. Jun 07, 2017
  14. May 31, 2017
  15. May 25, 2017
  16. May 23, 2017
  17. May 20, 2017
  18. May 19, 2017
    • Eugen Rochko's avatar
      Add buttons to block and unblock domain (#3127) · f1ab7064
      Eugen Rochko authored
      * 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
      f1ab7064
  19. Apr 19, 2017
  20. Apr 09, 2017
  21. Apr 08, 2017
  22. Mar 30, 2017
  23. Mar 22, 2017
  24. Mar 17, 2017
  25. Mar 06, 2017
  26. Mar 05, 2017
  27. Mar 02, 2017
  28. Feb 25, 2017
  29. Feb 17, 2017
  30. Jan 24, 2017
  31. Jan 23, 2017
  32. Jan 13, 2017
  33. Dec 22, 2016
  34. Dec 21, 2016
    • Eugen Rochko's avatar
      Private visibility on statuses prevents non-followers from seeing those · 80e02b90
      Eugen Rochko authored
      Filters out hidden stream entries from Atom feed
      Blocks now generate hidden stream entries, can be used to federate blocks
      Private statuses cannot be reblogged (generates generic 422 error for now)
      POST /api/v1/statuses now takes visibility=(public|unlisted|private) param instead of unlisted boolean
      Statuses JSON now contains visibility=(public|unlisted|private) field
      80e02b90
  35. Dec 01, 2016
  36. Nov 29, 2016
  37. Nov 25, 2016
Loading