1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-12 13:48:35 +09:00
YuruToot/app/javascript/mastodon/components
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
..
__tests__ Replace JavaScript Testing Framework from Mocha to Jest (#5412) 2017-10-16 09:33:08 +02:00
account.js Allow hiding of reblogs from followed users (#5762) 2017-11-28 15:00:35 +01:00
attachment_list.js Use Class and Property Decorators (#3730) 2017-06-23 19:36:54 +02:00
autosuggest_emoji.js Compress and combine emoji data (#5229) 2017-10-06 03:42:34 +02:00
autosuggest_textarea.js Implement hotkeys for web UI (#5164) 2017-10-06 01:07:59 +02:00
avatar_overlay.js Refactor Avatar and AvatarOverlay to have 'account' as prop instead of src and staticSrc (#4526) 2017-08-07 19:44:55 +02:00
avatar.js Refactor Avatar and AvatarOverlay to have 'account' as prop instead of src and staticSrc (#4526) 2017-08-07 19:44:55 +02:00
button.js Use Class and Property Decorators (#3730) 2017-06-23 19:36:54 +02:00
collapsable.js Add option to reduce motion (#5393) 2017-10-16 09:36:15 +02:00
column_back_button_slim.js Use Class and Property Decorators (#3730) 2017-06-23 19:36:54 +02:00
column_back_button.js Improve accessibility (part 7) (#4457) 2017-07-31 00:18:15 +02:00
column_header.js Fix column design broken with very long title (#5493) 2017-10-26 22:52:48 +09:00
column.js Fix the usages of Detect Passive Events (#4749) 2017-08-31 11:20:54 +02:00
display_name.js feat: Cache status height to avoid expensive renders (#4439) 2017-08-07 20:32:03 +02:00
dropdown_menu.js Rename ariaLabel property of Dropdown to title (#5813) 2017-11-25 15:41:08 +01:00
extended_video_player.js Add ability to specify alternative text for media attachments (#5123) 2017-09-28 15:31:31 +02:00
icon_button.js Avoid unnecessary Motion components in icon_button.js (#5544) 2017-10-27 19:08:07 +02:00
intersection_observer_article.js Improve IntersectionObserverArticle perf (#5152) 2017-09-30 14:28:49 +02:00
load_more.js Fix invisible load more button (#4962) 2017-09-16 00:32:43 +02:00
loading_indicator.js Add loading indicator animation (#4316) 2017-07-23 20:28:18 +02:00
media_gallery.js Refactor initial state: reduce_motion and auto_play_gif (#5501) 2017-10-28 00:04:44 +09:00
missing_indicator.js Replace sprockets/browserify with Webpack (#2617) 2017-05-03 02:04:16 +02:00
permalink.js Redesign the landing page, mount public timeline on it (#4122) 2017-07-11 15:27:59 +02:00
relative_timestamp.js Clear timer when unmounting RelativeTimestamp components (#5408) 2017-10-16 03:03:36 +02:00
scrollable_list.js Replace react-router-scroll to react-router-scroll-4 (#5568) 2017-11-01 06:58:38 +09:00
setting_text.js Improve accessibility (part 3) (#4405) 2017-07-28 00:54:48 +02:00
status_action_bar.js Rename ariaLabel property of Dropdown to title (#5813) 2017-11-25 15:41:08 +01:00
status_content.js Fix unwanted content warning gap in CSS (#5436) 2017-10-17 20:07:44 +02:00
status_list.js Implement hotkeys for web UI (#5164) 2017-10-06 01:07:59 +02:00
status.js Refactor initial state: "me" (#5563) 2017-10-31 11:27:48 +09:00