From: Sadposter Date: Thu, 28 Nov 2019 10:40:50 +0000 (+0000) Subject: obligatory format commit X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=c7cc80a9ee00f7bf9e307a09c5f2cc85fedd67d5;p=akkoma obligatory format commit --- diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 6a97e1928..63c5b4102 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -1020,7 +1020,8 @@ defmodule Pleroma.User do do: Enum.member?(user.muted_notifications, ap_id) def blocks?(%User{} = user, %User{} = target) do - blocks_ap_id?(user, target) || (!User.following?(user, target) && blocks_domain?(user, target)) + blocks_ap_id?(user, target) || + (!User.following?(user, target) && blocks_domain?(user, target)) end def blocks?(nil, _), do: false diff --git a/test/user_test.exs b/test/user_test.exs index 6a3820455..6ae563258 100644 --- a/test/user_test.exs +++ b/test/user_test.exs @@ -881,13 +881,13 @@ defmodule Pleroma.UserTest do end test "follows take precedence over domain blocks" do - user = insert(:user) - good_eggo = insert(:user, %{ap_id: "https://meanies.social/user/cuteposter"}) - - {:ok, user} = User.block_domain(user, "meanies.social") - {:ok, user} = User.follow(user, good_eggo) + user = insert(:user) + good_eggo = insert(:user, %{ap_id: "https://meanies.social/user/cuteposter"}) + + {:ok, user} = User.block_domain(user, "meanies.social") + {:ok, user} = User.follow(user, good_eggo) - refute User.blocks?(user, good_eggo) + refute User.blocks?(user, good_eggo) end end