catstodon/app/javascript/mastodon/features
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.
2017-11-28 15:00:35 +01:00
..
account/components Allow hiding of reblogs from followed users (#5762) 2017-11-28 15:00:35 +01:00
account_gallery Replace react-router-scroll to react-router-scroll-4 (#5568) 2017-11-01 06:58:38 +09:00
account_timeline Allow hiding of reblogs from followed users (#5762) 2017-11-28 15:00:35 +01:00
blocks Replace react-router-scroll to react-router-scroll-4 (#5568) 2017-11-01 06:58:38 +09:00
community_timeline Refactoring streaming connections (#4645) 2017-08-21 15:04:34 +02:00
compose Do not require onClose property in NavigationBar (#5802) 2017-11-24 13:13:17 +01:00
emoji Avoid emojifying on invisible text (#5558) 2017-11-07 14:48:13 +01:00
favourited_statuses Add Smartphone screen favourite back button and adjust styles (#4813) 2017-09-06 17:32:15 +02:00
favourites Replace react-router-scroll to react-router-scroll-4 (#5568) 2017-11-01 06:58:38 +09:00
follow_requests Replace react-router-scroll to react-router-scroll-4 (#5568) 2017-11-01 06:58:38 +09:00
followers Replace react-router-scroll to react-router-scroll-4 (#5568) 2017-11-01 06:58:38 +09:00
following Replace react-router-scroll to react-router-scroll-4 (#5568) 2017-11-01 06:58:38 +09:00
generic_not_found Replace sprockets/browserify with Webpack (#2617) 2017-05-03 02:04:16 +02:00
getting_started Refactor initial state: "me" (#5563) 2017-10-31 11:27:48 +09:00
hashtag_timeline Refactoring streaming connections (#4645) 2017-08-21 15:04:34 +02:00
home_timeline Do not try to guess why home timeline is empty in web UI (#5370) 2017-10-13 16:44:16 +02:00
keyboard_shortcuts Refactor KeyboardShortcuts component (#5835) 2017-11-28 14:32:27 +01:00
list_timeline Display list column (#5750) 2017-11-25 00:35:37 +01:00
mutes Replace react-router-scroll to react-router-scroll-4 (#5568) 2017-11-01 06:58:38 +09:00
notifications Implement hotkeys for web UI (#5164) 2017-10-06 01:07:59 +02:00
pinned_statuses Add Pinned toot column (#4817) 2017-09-07 09:58:11 +02:00
public_timeline Refactoring streaming connections (#4645) 2017-08-21 15:04:34 +02:00
reblogs Replace react-router-scroll to react-router-scroll-4 (#5568) 2017-11-01 06:58:38 +09:00
report feat: Cache status height to avoid expensive renders (#4439) 2017-08-07 20:32:03 +02:00
standalone Redesign public hashtag pages (#5237) 2017-10-07 20:00:35 +02:00
status Allow to open a modal for embedded photo (#5777) 2017-11-25 15:41:45 +01:00
ui Add Keyboard Shortcuts Legend (#5823) 2017-11-27 21:31:58 +01:00
video Fix an error when video playback buffer is empty (#5300) 2017-10-10 15:17:53 +02:00