hometown/app/services
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
..
activitypub Fix NoMethodError at ActivityPub::FetchRemoteStatusService (#5753) 2017-11-19 15:33:15 +01:00
concerns Introduce OStatus::TagManager (#5008) 2017-09-19 18:08:08 +02:00
pubsubhubbub Fix #2672 - Connect signed PuSH subscription requests to instance domain (#4205) 2017-07-14 23:01:20 +02:00
account_search_service.rb Fix an error when a user tries to search nonexistent remote user (regression from #4275) (#4400) 2017-07-27 15:11:59 +02:00
after_block_service.rb Optimize MuteService and AfterBlockService (#2836) 2017-05-06 16:31:07 +02:00
authorize_follow_service.rb Add handling of Linked Data Signatures in payloads (#4687) 2017-08-26 13:47:38 +02:00
base_service.rb Remove unused AtomBuilderHelper (#1364) 2017-04-11 19:31:22 +02:00
batched_remove_status_service.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
block_domain_from_account_service.rb Add buttons to block and unblock domain (#3127) 2017-05-19 21:05:32 +02:00
block_domain_service.rb Admin interface for listing, adding and removing custom emojis (#5002) 2017-09-19 03:52:38 +02:00
block_service.rb Add handling of Linked Data Signatures in payloads (#4687) 2017-08-26 13:47:38 +02:00
bootstrap_timeline_service.rb Default follows for new users (#4871) 2017-09-10 09:58:38 +02:00
fan_out_on_write_service.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
favourite_service.rb Add handling of Linked Data Signatures in payloads (#4687) 2017-08-26 13:47:38 +02:00
fetch_atom_service.rb Fix regression in FetchRemoteResourceService (#5217) 2017-10-05 00:21:44 +02:00
fetch_link_card_service.rb Fixed duplicating URL of photo type of oEmbed (#5763) 2017-11-20 20:45:54 +01:00
fetch_remote_account_service.rb Validate id of ActivityPub representations (#5114) 2017-10-04 01:13:48 +02:00
fetch_remote_resource_service.rb Fix regression in FetchRemoteResourceService (#5217) 2017-10-05 00:21:44 +02:00
fetch_remote_status_service.rb Fix remote status fetching for “pure” ActivityPub WEB_ACCOUNT users (#5372) 2017-10-13 12:58:13 +02:00
follow_service.rb Allow hiding of reblogs from followed users (#5762) 2017-11-28 15:00:35 +01:00
mute_service.rb Optional notification muting (#5087) 2017-11-15 03:56:41 +01:00
notify_service.rb Allow hiding of reblogs from followed users (#5762) 2017-11-28 15:00:35 +01:00
post_status_service.rb Instantiate service classes for each call (fixes #5540) (#5543) 2017-10-27 19:08:30 +02:00
precompute_feed_service.rb Non-Serial ("Snowflake") IDs (#4801) 2017-10-04 09:56:37 +02:00
process_feed_service.rb Set snowflake IDs for backdated statuses (#5260) 2017-10-08 17:34:34 +02:00
process_hashtags_service.rb Unify the method of extracting tags (#3138) 2017-05-19 20:19:14 +02:00
process_interaction_service.rb Introduce OStatus::TagManager (#5008) 2017-09-19 18:08:08 +02:00
process_mentions_service.rb Fix handling of temporary failures in ProcessMentionsService (#5842) 2017-11-28 15:00:22 +01:00
reblog_service.rb Avoid sending some ActivityPub payloads if the receiver will get them through distribution (#4739) 2017-09-01 21:26:01 +02:00
reject_follow_service.rb Add handling of Linked Data Signatures in payloads (#4687) 2017-08-26 13:47:38 +02:00
remove_status_service.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
resolve_remote_account_service.rb Fix some rubocop style issues (#5730) 2017-11-17 10:06:26 +09:00
search_service.rb Add specs (and refactor) of FetchRemoteResourceService and SearchService (#2812) 2017-05-05 17:26:04 +02:00
send_interaction_service.rb Close connection when succeeded posting (#5390) 2017-10-14 14:38:57 +02:00
subscribe_service.rb Close connection when succeeded posting (#5390) 2017-10-14 14:38:57 +02:00
suspend_account_service.rb Add ability to disable login and mark accounts as memorial (#5615) 2017-11-07 19:06:44 +01:00
unblock_domain_service.rb Allow domain blocks that only reject media without silencing or suspending (#4325) 2017-07-24 14:26:55 +02:00
unblock_service.rb Add handling of Linked Data Signatures in payloads (#4687) 2017-08-26 13:47:38 +02:00
unfavourite_service.rb Add handling of Linked Data Signatures in payloads (#4687) 2017-08-26 13:47:38 +02:00
unfollow_service.rb Make "unfollow" undo pending outgoing follow request too (#4781) 2017-09-02 20:44:41 +02:00
unmute_service.rb Fix #231 - Muting 2017-03-02 18:49:32 +01:00
unsubscribe_service.rb Close connection when succeeded posting (#5390) 2017-10-14 14:38:57 +02:00
update_account_service.rb authorize-follow-requests-after-unlocking (#4658) 2017-08-26 12:40:03 +02:00
update_remote_profile_service.rb Account deletion (#3728) 2017-06-14 18:01:27 +02:00
verify_salmon_service.rb Introduce OStatus::TagManager (#5008) 2017-09-19 18:08:08 +02:00