Fix static-fe Twitter metadata / URL previews #700

Merged
floatingghost merged 2 commits from Oneric/akkoma:staticfe-metadata into develop 2024-02-24 13:42:56 +00:00
Showing only changes of commit 37e2a35b86 - Show all commits

View file

@ -24,7 +24,13 @@ def show(%{assigns: %{notice_id: notice_id}} = conn, _params) do
true <- Visibility.is_public?(activity.object),
{_, true} <- {:visible?, Visibility.visible_for_user?(activity, _reading_user = nil)},
%User{} = user <- User.get_by_ap_id(activity.object.data["actor"]) do
meta = Metadata.build_tags(%{url: activity.data["id"], object: activity.object, user: user})
meta =
Metadata.build_tags(%{
activity_id: notice_id,
url: activity.data["id"],
object: activity.object,
user: user
})
timeline =
activity.object.data["context"]