Mastodon API: Add unsupported attributes to relationship responses

These attributes are documented as required by the Mastodon API.
Since we don’t support them (I think?), respond with default values.
This commit is contained in:
Martin Kühl 2018-09-05 20:13:50 +02:00
parent 403f9d118d
commit 619f67768a
2 changed files with 6 additions and 2 deletions

View File

@ -75,8 +75,10 @@ def render("relationship.json", %{user: user, target: target}) do
followed_by: User.following?(target, user),
blocking: User.blocks?(user, target),
muting: false,
muting_notifications: false,
requested: false,
domain_blocking: false
domain_blocking: false,
showing_reblogs: false
}
end

View File

@ -123,8 +123,10 @@ test "represent a relationship" do
followed_by: false,
blocking: true,
muting: false,
muting_notifications: false,
requested: false,
domain_blocking: false
domain_blocking: false,
showing_reblogs: false
}
assert expected == AccountView.render("relationship.json", %{user: user, target: other_user})