Provide local og:url for remote activities
authorrinpatch <rinpatch@sdf.org>
Sat, 19 Jan 2019 07:58:27 +0000 (10:58 +0300)
committerrinpatch <rinpatch@sdf.org>
Sat, 19 Jan 2019 07:58:27 +0000 (10:58 +0300)
lib/pleroma/web/metadata/opengraph.ex
lib/pleroma/web/ostatus/ostatus_controller.ex

index 1028e35c27f2e44b6234d093f4609b769971c404..30333785ef05ec6b64c306526d96744ef9191909 100644 (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 @@ 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",
index 4844b84ad857fc5f2e6608985c6dacf51313bc3e..f04754f08d0b8480bd0acf230cb1c7552b50829f 100644 (file)
@@ -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