Commit 33beb51d authored by lain's avatar lain
Browse files

MastoAPI: Add blocking to AccountView.

parent 9b63647a
......@@ -55,7 +55,7 @@ def render("relationship.json", %{user: user, target: target}) do
id: target.id,
following: User.following?(user, target),
followed_by: User.following?(target, user),
blocking: false,
blocking: User.blocks?(user, target),
muting: false,
requested: false,
domain_blocking: false
......
......@@ -51,12 +51,13 @@ test "represent a relationship" do
other_user = insert(:user)
{:ok, user} = User.follow(user, other_user)
{:ok, user} = User.block(user, other_user)
expected = %{
id: other_user.id,
following: true,
followed_by: false,
blocking: false,
blocking: true,
muting: false,
requested: false,
domain_blocking: false
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment