diff options
author | aschmitz <aschmitz@lardbucket.org> | 2017-11-10 20:11:10 -0600 |
---|---|---|
committer | aschmitz <aschmitz@lardbucket.org> | 2017-11-10 22:04:54 -0600 |
commit | b95c48748cd4e7a1181cdf3f17e23d6e526a9d95 (patch) | |
tree | a3d69c3831ef59755609a999c8eaae23c720049f /app/models/concerns/account_interactions.rb | |
parent | 49445150202f0bdaae942b9ae1ba44802a1c22e9 (diff) |
Per-user reblog hiding implementation/fixes/tests
Note that this will only hide/show *future* reblogs by a user, and does nothing to remove/add reblogs that are already in the timeline. I don't think that's a particularly confusing behavior, and it's a lot easier to implement (similar to mutes, I believe).
Diffstat (limited to 'app/models/concerns/account_interactions.rb')
-rw-r--r-- | app/models/concerns/account_interactions.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/concerns/account_interactions.rb b/app/models/concerns/account_interactions.rb index 088fef4da..60fd6ded5 100644 --- a/app/models/concerns/account_interactions.rb +++ b/app/models/concerns/account_interactions.rb @@ -81,7 +81,7 @@ module AccountInteractions rel.show_reblogs = reblogs rel.save! end - + rel end @@ -156,6 +156,10 @@ module AccountInteractions mute_relationships.where(target_account: other_account, hide_notifications: true).exists? end + def muting_reblogs?(other_account) + active_relationships.where(target_account: other_account, show_reblogs: false).exists? + end + def requested?(other_account) follow_requests.where(target_account: other_account).exists? end |