Provide local og:url for remote activities
This commit is contained in:
parent
74346a7035
commit
afd83db0d7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue