app/policies/federails/client/following_policy.rb in federails-0.2.0 vs app/policies/federails/client/following_policy.rb in federails-0.3.0
- old
+ new
@@ -24,12 +24,12 @@
end
private
def in_following?
- return false if @user.blank?
+ return false unless user_with_actor?
- @record.actor_id == @user.actor.id || @record.target_actor_id == @user.actor.id
+ @record.actor_id == @user.actor&.id || @record.target_actor_id == @user.actor&.id
end
end
end
end