1
0
REI-Fixed/spec/models
aschmitz eeaec39888 Allow hiding of reblogs from followed users ()
* 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  and resolves .

* 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-28 15:00:35 +01:00
..
admin Add logging of admin actions () 2017-11-24 02:05:53 +01:00
concerns Allow hiding of reblogs from followed users () 2017-11-28 15:00:35 +01:00
form Improve admin page () 2017-07-18 16:38:22 +02:00
web Web Push Notifications () 2017-07-13 22:15:32 +02:00
account_domain_block_spec.rb Spec AccountDomainBlock () 2017-06-18 02:59:49 +02:00
account_filter_spec.rb Add coverage for ReportFilter and AccountFilter () 2017-05-22 15:50:58 -04:00
account_moderation_note_spec.rb Lists () 2017-11-18 00:16:48 +01:00
account_spec.rb Implement tests for Account#refresh! () 2017-11-06 13:54:41 +09:00
block_spec.rb Cover Block more () 2017-06-19 11:31:37 +02:00
conversation_mute_spec.rb Feature conversations muting () 2017-05-15 03:04:13 +02:00
conversation_spec.rb Add conversation model, <ostatus:conversation /> () 2017-05-12 19:09:21 +02:00
custom_emoji_spec.rb Add tests for CustomEmoji#local? and #object_type () 2017-11-08 15:28:17 +09:00
domain_block_spec.rb Cover DomainBlock more () 2017-06-19 11:31:27 +02:00
email_domain_block_spec.rb Add uniqueness to block email domains () 2017-11-14 20:37:17 +01:00
export_spec.rb Cover Export more () 2017-06-19 11:30:27 +02:00
favourite_spec.rb Cover Favourite more () 2017-06-19 01:38:50 +02:00
follow_request_spec.rb Allow hiding of reblogs from followed users () 2017-11-28 15:00:35 +01:00
follow_spec.rb Introduce recent to Follow () 2017-05-23 13:12:19 +02:00
home_feed_spec.rb Lists () 2017-11-18 00:16:48 +01:00
import_spec.rb Validate data of Imports () 2017-09-02 20:45:42 +02:00
invite_spec.rb Add consumable invites () 2017-11-27 16:07:59 +01:00
list_account_spec.rb Lists () 2017-11-18 00:16:48 +01:00
list_spec.rb Lists () 2017-11-18 00:16:48 +01:00
media_attachment_spec.rb Add tests for MediaAttachment () 2017-11-08 15:29:07 +09:00
mention_spec.rb add more tests to models 2017-04-05 00:29:56 +02:00
mute_spec.rb Mute button progress so far. WIP, doesn't entirely work correctly. 2017-03-01 22:31:21 -06:00
notification_spec.rb Fix N+1 at notification () 2017-11-19 15:32:48 +01:00
preview_card_spec.rb Fix - Fetch and display previews of URLs using OpenGraph tags 2017-01-20 01:00:14 +01:00
remote_follow_spec.rb Remove empty strings () 2017-11-17 10:52:30 +09:00
remote_profile_spec.rb Add tests for RemoteProfile () 2017-11-12 16:23:31 +09:00
report_filter_spec.rb Add coverage for ReportFilter and AccountFilter () 2017-05-22 15:50:58 -04:00
report_spec.rb Feat add validation for report comment: characters under 1000 valid () 2017-09-07 09:55:42 +02:00
session_activation_spec.rb Add tests for SessionActivation () 2017-11-13 09:54:48 +09:00
setting_spec.rb Add tests for Setting () 2017-11-14 11:08:04 +09:00
site_upload_spec.rb Add a test for SiteUpload#cache_key () 2017-11-14 20:44:11 +01:00
status_pin_spec.rb Pinned statuses () 2017-08-25 01:41:18 +02:00
status_spec.rb Add tests for Status#title () 2017-11-19 04:15:17 +01:00
stream_entry_spec.rb Add tests for StreamEntry () 2017-11-15 02:00:58 +01:00
subscription_spec.rb Misc spec coverage improvements () 2017-05-05 14:56:00 -04:00
tag_spec.rb Add a test for Tag#to_param () 2017-11-15 16:04:41 +01:00
user_spec.rb Add consumable invites () 2017-11-27 16:07:59 +01:00