[#1973] Fixed accounts rendering in GET /api/v1/pleroma/chats with truish :restrict_unauthenticated.
Made `Pleroma.Web.MastodonAPI.AccountView.render("show.json", _)` demand :for or :force option in order to prevent incorrect rendering of empty map instead of expected user representation with truish :restrict_unauthenticated setting.
This commit is contained in:
parent
1c9752cff4
commit
6f5f7af607
20 changed files with 143 additions and 82 deletions
|
|
@ -26,7 +26,7 @@ defmodule Pleroma.Web.PleromaAPI.ChatViewTest do
|
|||
|
||||
assert represented_chat == %{
|
||||
id: "#{chat.id}",
|
||||
account: AccountView.render("show.json", user: recipient),
|
||||
account: AccountView.render("show.json", user: recipient, force: true),
|
||||
unread: 0,
|
||||
last_message: nil,
|
||||
updated_at: Utils.to_masto_date(chat.updated_at)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue