From: rinpatch Date: Sat, 19 Jan 2019 07:58:27 +0000 (+0300) Subject: Provide local og:url for remote activities X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=afd83db0d7be4890dd345ba1f78e46da8b74d449;p=akkoma Provide local og:url for remote activities --- diff --git a/lib/pleroma/web/metadata/opengraph.ex b/lib/pleroma/web/metadata/opengraph.ex index 1028e35c2..30333785e 100644 --- a/lib/pleroma/web/metadata/opengraph.ex +++ b/lib/pleroma/web/metadata/opengraph.ex @@ -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 @@ defmodule Pleroma.Web.Metadata.Providers.OpenGraph do 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", diff --git a/lib/pleroma/web/ostatus/ostatus_controller.ex b/lib/pleroma/web/ostatus/ostatus_controller.ex index 4844b84ad..f04754f08 100644 --- a/lib/pleroma/web/ostatus/ostatus_controller.ex +++ b/lib/pleroma/web/ostatus/ostatus_controller.ex @@ -150,6 +150,7 @@ defmodule Pleroma.Web.OStatus.OStatusController 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