1
0
puyopuyotetr.is/app/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.
2017-11-28 15:00:35 +01:00
..
admin Add logging of admin actions (#5757) 2017-11-24 02:05:53 +01:00
concerns Allow hiding of reblogs from followed users (#5762) 2017-11-28 15:00:35 +01:00
form Fix account migration feature (#5837) 2017-11-28 14:31:23 +01:00
web Lists (#5703) 2017-11-18 00:16:48 +01:00
account_domain_block.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
account_filter.rb Improve admin UI for custom emojis, add copy/disable/enable (#5231) 2017-10-05 23:42:05 +02:00
account_moderation_note.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
account.rb Profile redirect notes (#5746) 2017-11-18 19:39:02 +01:00
admin.rb Add logging of admin actions (#5757) 2017-11-24 02:05:53 +01:00
application_record.rb Fix rubocop issues, introduce usage of frozen literal to improve performance 2016-11-15 16:56:29 +01:00
block.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
context.rb Refactor JSON templates to be generated with ActiveModelSerializers instead of Rabl (#4090) 2017-07-07 04:02:06 +02:00
conversation_mute.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
conversation.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
custom_emoji_filter.rb Improve admin UI for custom emojis, add copy/disable/enable (#5231) 2017-10-05 23:42:05 +02:00
custom_emoji.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
domain_block.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
email_domain_block.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
export.rb Settings export refactor (#1646) 2017-04-13 13:02:02 +02:00
favourite.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
feed.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
follow_request.rb Allow hiding of reblogs from followed users (#5762) 2017-11-28 15:00:35 +01:00
follow.rb Allow hiding of reblogs from followed users (#5762) 2017-11-28 15:00:35 +01:00
home_feed.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
import.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
instance_filter.rb Add instance search feature (#4925) 2017-09-13 12:30:07 +02:00
instance.rb Add Instance class to list admin records (#3443) 2017-05-31 20:38:44 +02:00
invite.rb Add consumable invites (#5814) 2017-11-27 16:07:59 +01:00
list_account.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
list_feed.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
list.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
media_attachment.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
mention.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
mute.rb Optional notification muting (#5087) 2017-11-15 03:56:41 +01:00
notification.rb Fix N+1 at notification (#5752) 2017-11-19 15:32:48 +01:00
preview_card.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
remote_follow.rb rescue HTTP::ConnectionError in RemoteFollowController#create (#4726) 2017-08-28 19:12:09 +02:00
remote_profile.rb Introduce OStatus::TagManager (#5008) 2017-09-19 18:08:08 +02:00
report_filter.rb Admin reports with accounts (#2092) 2017-04-18 19:36:18 +02:00
report.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
search.rb Refactor JSON templates to be generated with ActiveModelSerializers instead of Rabl (#4090) 2017-07-07 04:02:06 +02:00
session_activation.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
setting.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
site_upload.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
status_pin.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
status.rb status: preserve visibility attribute when reblogging (infoleak fix) (#5789) 2017-11-25 01:36:08 +01:00
stream_entry.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
subscription.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
tag.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
user.rb Add consumable invites (#5814) 2017-11-27 16:07:59 +01:00
web.rb Add extended about page stub 2017-01-13 03:24:41 +01:00