activitypub: prime OGP crawler cache when new messages are inserted into the database
authorWilliam Pitcock <nenolod@dereferenced.org>
Mon, 28 Jan 2019 06:07:18 +0000 (06:07 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Mon, 28 Jan 2019 06:07:18 +0000 (06:07 +0000)
lib/pleroma/web/activity_pub/activity_pub.ex

index feff2240071707ceda6e47aa191937eb648fde51..0199ac9e7c0558a5db0721fd2ffc71a17ff486b9 100644 (file)
@@ -88,6 +88,10 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
           recipients: recipients
         })
 
+      Task.start(fn ->
+        Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity)
+      end)
+
       Notification.create_notifications(activity)
       stream_out(activity)
       {:ok, activity}