AccountView: Add 'accepts_chat_messages' to view.

This commit is contained in:
lain 2020-07-03 13:07:33 +02:00
parent 98bfdba108
commit 3250228be9
2 changed files with 6 additions and 3 deletions

View File

@ -245,7 +245,8 @@ defp do_render("show.json", %{user: user} = opts) do
hide_favorites: user.hide_favorites,
relationship: relationship,
skip_thread_containment: user.skip_thread_containment,
background_image: image_url(user.background) |> MediaProxy.url()
background_image: image_url(user.background) |> MediaProxy.url(),
accepts_chat_messages: user.accepts_chat_messages
}
}
|> maybe_put_role(user, opts[:for])

View File

@ -85,7 +85,8 @@ test "Represent a user account" do
hide_followers_count: false,
hide_follows_count: false,
relationship: %{},
skip_thread_containment: false
skip_thread_containment: false,
accepts_chat_messages: false
}
}
@ -162,7 +163,8 @@ test "Represent a Service(bot) account" do
hide_followers_count: false,
hide_follows_count: false,
relationship: %{},
skip_thread_containment: false
skip_thread_containment: false,
accepts_chat_messages: false
}
}