Commit afd83db0 authored by rinpatch's avatar rinpatch
Browse files

Provide local og:url for remote activities

parent 74346a70
......@@ -13,6 +13,7 @@ defmodule Pleroma.Web.Metadata.Providers.OpenGraph do
@impl Provider
def build_tags(%{
object: object,
url: url,
user: user
}) do
attachments = build_attachments(object)
......@@ -37,7 +38,7 @@ def build_tags(%{
property: "og:title",
content: "#{user.name}" <> content
], []},
{:meta, [property: "og:url", content: object.data["id"]], []},
{:meta, [property: "og:url", content: url], []},
{:meta,
[
property: "og:description",
......
......@@ -150,6 +150,7 @@ def notice(conn, %{"id" => id}) do
Fallback.RedirectController.redirector_with_meta(conn, %{
object: object,
url: Pleroma.Web.Router.Helpers.o_status_url(Pleroma.Web.Endpoint, :notice, activity.id),
user: user
})
else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment