X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fmastodon_api%2Fviews%2Fstatus_view.ex;h=d4695c1c6cff04c207aca524446554b5a6ed7971;hb=226f4d5ef93805e2ff93f00d443238ab7afeb3e6;hp=6cb158bbfedaec737e1ede58975a053dd4b116fb;hpb=6813c0302c2b665d337d5f5831d2df6312b6b277;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 6cb158bbf..d4695c1c6 100644 --- a/lib/pleroma/web/mastodon_api/views/status_view.ex +++ b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -242,9 +242,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do with %{data: %{"reactions" => emoji_reactions}} <- object do Enum.map(emoji_reactions, fn [emoji, users] -> %{ - emoji: emoji, + name: emoji, count: length(users), - reacted: !!(opts[:for] && opts[:for].ap_id in users) + me: !!(opts[:for] && opts[:for].ap_id in users) } end) else @@ -321,11 +321,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do nil end - site_name = rich_media[:site_name] || page_url_data.host - %{ type: "link", - provider_name: site_name, + provider_name: page_url_data.host, provider_url: page_url_data.scheme <> "://" <> page_url_data.host, url: page_url, image: image_url |> MediaProxy.url(),