Add license/copyright to all project files
[akkoma] / lib / pleroma / web / mastodon_api / views / status_view.ex
index 7eea0122b6727294f64e4f3e9e21ff1f92dffd09..ec582b919c626aa5c8f1e9330a03c0d1afafac8d 100644 (file)
@@ -104,7 +104,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
       id: to_string(activity.id),
       uri: activity_object.data["id"],
       url: activity_object.data["id"],
-      account: AccountView.render("account.json", %{user: user}),
+      account: AccountView.render("account.json", %{user: user, for: opts[:for]}),
       in_reply_to_id: nil,
       in_reply_to_account_id: nil,
       reblog: reblogged,
@@ -221,7 +221,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
       id: to_string(activity.id),
       uri: object.data["id"],
       url: url,
-      account: AccountView.render("account.json", %{user: user}),
+      account: AccountView.render("account.json", %{user: user, for: opts[:for]}),
       in_reply_to_id: reply_to && to_string(reply_to.id),
       in_reply_to_account_id: reply_to_user && to_string(reply_to_user.id),
       reblog: nil,
@@ -330,7 +330,6 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
     }
   end
 
-  # TODO: Add tests for this view
   def render("poll.json", %{object: object} = opts) do
     {multiple, options} =
       case object.data do