mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-27 08:16:16 +00:00
MastoAPI: Add blocking to AccountView.
This commit is contained in:
parent
9b63647aff
commit
33beb51da4
|
@ -55,7 +55,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
|
||||||
id: target.id,
|
id: target.id,
|
||||||
following: User.following?(user, target),
|
following: User.following?(user, target),
|
||||||
followed_by: User.following?(target, user),
|
followed_by: User.following?(target, user),
|
||||||
blocking: false,
|
blocking: User.blocks?(user, target),
|
||||||
muting: false,
|
muting: false,
|
||||||
requested: false,
|
requested: false,
|
||||||
domain_blocking: false
|
domain_blocking: false
|
||||||
|
|
|
@ -51,12 +51,13 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
|
||||||
other_user = insert(:user)
|
other_user = insert(:user)
|
||||||
|
|
||||||
{:ok, user} = User.follow(user, other_user)
|
{:ok, user} = User.follow(user, other_user)
|
||||||
|
{:ok, user} = User.block(user, other_user)
|
||||||
|
|
||||||
expected = %{
|
expected = %{
|
||||||
id: other_user.id,
|
id: other_user.id,
|
||||||
following: true,
|
following: true,
|
||||||
followed_by: false,
|
followed_by: false,
|
||||||
blocking: false,
|
blocking: true,
|
||||||
muting: false,
|
muting: false,
|
||||||
requested: false,
|
requested: false,
|
||||||
domain_blocking: false
|
domain_blocking: false
|
||||||
|
|
Loading…
Reference in a new issue