Fix mixed up block handling in follow method

This commit is contained in:
Karina Kwiatek 2022-06-11 23:13:04 +02:00 committed by Karina Kwiatek
parent d6e4ad35ad
commit e9fa3b83b2
1 changed files with 2 additions and 2 deletions

View File

@ -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