Provide local og:url for remote activities

This commit is contained in:
rinpatch 2019-01-19 10:58:27 +03:00
parent 74346a7035
commit afd83db0d7
2 changed files with 3 additions and 1 deletions

View file

@ -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",

View file

@ -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