X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fmastodon_api%2Fviews%2Fstatus_view.ex;h=55675ae1c38b624f71db2e4df5ee76b020a0a0b4;hb=0300bc5569a6fd8b728659dc5198896d25f41c80;hp=4f395d0f7ab0ce9ad0a7e4aa6a9af33bfd098bb3;hpb=460062f2b04220ffcd8f20aa842cc95582d1f849;p=akkoma diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex index 4f395d0f7..55675ae1c 100644 --- a/lib/pleroma/web/mastodon_api/views/status_view.ex +++ b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -16,7 +16,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do reblogged = Activity.get_create_activity_by_object_ap_id(object) reblogged = render("status.json", Map.put(opts, :activity, reblogged)) - mentions = activity.data["to"] + mentions = activity.recipients |> Enum.map(fn (ap_id) -> User.get_cached_by_ap_id(ap_id) end) |> Enum.filter(&(&1)) |> Enum.map(fn (user) -> AccountView.render("mention.json", %{user: user}) end) @@ -60,7 +60,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do tags = object["tag"] || [] sensitive = object["sensitive"] || Enum.member?(tags, "nsfw") - mentions = activity.data["to"] + mentions = activity.recipients |> Enum.map(fn (ap_id) -> User.get_cached_by_ap_id(ap_id) end) |> Enum.filter(&(&1)) |> Enum.map(fn (user) -> AccountView.render("mention.json", %{user: user}) end)