From e9fa3b83b2fd8a022b445589e4382e1e7863c12b Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sat, 11 Jun 2022 23:13:04 +0200 Subject: [PATCH] Fix mixed up block handling in follow method --- app/models/user/relationship/follow.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/user/relationship/follow.rb b/app/models/user/relationship/follow.rb index 4b2fc9d7..fd4701ba 100644 --- a/app/models/user/relationship/follow.rb +++ b/app/models/user/relationship/follow.rb @@ -21,8 +21,8 @@ class User # Follow an user def follow(target_user) raise Errors::FollowingSelf if target_user == self - raise Errors::FollowingOtherBlockedSelf if self.blocking?(target_user) - raise Errors::FollowingSelfBlockedOther if target_user.blocking?(self) + raise Errors::FollowingOtherBlockedSelf if target_user.blocking?(self) + raise Errors::FollowingSelfBlockedOther if self.blocking?(target_user) create_relationship(active_follow_relationships, target_user) end