You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mastodon/spec/controllers
aschmitz eeaec39888 Allow hiding of reblogs from followed users (#5762)
* 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.
7 years ago
..
activitypub Set correct content-type for ActivityPub JSON (#4592) 7 years ago
admin Add moderation note (#5240) 7 years ago
api Allow hiding of reblogs from followed users (#5762) 7 years ago
auth Default follows for new users (#4871) 7 years ago
concerns Improve spec of Feed and UserTrackingConcern (#5367) 7 years ago
oauth Cover Oauth::AuthorizedApplicationsController (#3359) 8 years ago
settings Remove empty strings (#5732) 7 years ago
well_known Improve ActivityPub representations (#3844) 7 years ago
about_controller_spec.rb Cover AboutController more in spec (#3226) 8 years ago
account_follow_controller_spec.rb Cover AccountFollowController more in spec (#3227) 8 years ago
account_unfollow_controller_spec.rb Cover AccountUnfollowController more in spec (#3228) 8 years ago
accounts_controller_spec.rb Rewrite account_controller_spec (#5633) 7 years ago
application_controller_spec.rb Use "match_array" only for order independent assertions (#3626) 7 years ago
authorize_follows_controller_spec.rb Remote following success page (#4129) 7 years ago
follower_accounts_controller_spec.rb Introduce recent to Follow (#3247) 8 years ago
following_accounts_controller_spec.rb Introduce recent to Follow (#3247) 8 years ago
home_controller_spec.rb When web UI URL used while logged out, redirect to static page (#4954) 7 years ago
manifests_controller_spec.rb Make Chrome splash screen same color as web UI's background color (#5169) 7 years ago
media_controller_spec.rb Extract authorization policy for viewing statuses (#3150) 8 years ago
remote_follow_controller_spec.rb rescue HTTP::ConnectionError in RemoteFollowController#create (#4726) 7 years ago
statuses_controller_spec.rb Fetch reblogs as Announce activity instead of Note object (#4672) 7 years ago
stream_entries_controller_spec.rb Update status embeds (#4742) 7 years ago
tags_controller_spec.rb Redesign public hashtag pages (#5237) 7 years ago