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/models
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
..
admin Add logging of admin actions (#5757) 7 years ago
concerns Allow hiding of reblogs from followed users (#5762) 7 years ago
form
web
account_domain_block_spec.rb
account_filter_spec.rb
account_moderation_note_spec.rb Lists (#5703) 7 years ago
account_spec.rb Implement tests for Account#refresh! (#5601) 7 years ago
block_spec.rb
conversation_mute_spec.rb
conversation_spec.rb
custom_emoji_spec.rb Add tests for CustomEmoji#local? and #object_type (#5621) 7 years ago
domain_block_spec.rb
email_domain_block_spec.rb Add uniqueness to block email domains (#5692) 7 years ago
export_spec.rb
favourite_spec.rb
follow_request_spec.rb Allow hiding of reblogs from followed users (#5762) 7 years ago
follow_spec.rb
home_feed_spec.rb Lists (#5703) 7 years ago
import_spec.rb
invite_spec.rb Add consumable invites (#5814) 7 years ago
list_account_spec.rb Lists (#5703) 7 years ago
list_spec.rb Lists (#5703) 7 years ago
media_attachment_spec.rb Add tests for MediaAttachment (#5620) 7 years ago
mention_spec.rb
mute_spec.rb
notification_spec.rb Fix N+1 at notification (#5752) 7 years ago
preview_card_spec.rb
remote_follow_spec.rb Remove empty strings (#5732) 7 years ago
remote_profile_spec.rb Add tests for RemoteProfile (#5665) 7 years ago
report_filter_spec.rb
report_spec.rb
session_activation_spec.rb Add tests for SessionActivation (#5668) 7 years ago
setting_spec.rb Add tests for Setting (#5683) 7 years ago
site_upload_spec.rb Add a test for SiteUpload#cache_key (#5685) 7 years ago
status_pin_spec.rb
status_spec.rb Add tests for Status#title (#5718) 7 years ago
stream_entry_spec.rb Add tests for StreamEntry (#5687) 7 years ago
subscription_spec.rb
tag_spec.rb Add a test for Tag#to_param (#5705) 7 years ago
user_spec.rb Add consumable invites (#5814) 7 years ago