Put rich media processing in a Task
[akkoma] / lib / pleroma / web / mastodon_api / views / status_view.ex
index cc58f803e6b2c7773c96f6b1ad21d7ce0f7830ee..8fbf9b6d91b199d3dc11f17442d45acb808ff798 100644 (file)
@@ -28,7 +28,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
   # to fetch the preview. However it should be fine considering
   # pagination is restricted to 40 activities at a time
   defp fetch_rich_media_for_activities(activities) do
-    Enum.each(activities, fn activity ->
+    Enum.map(activities, fn activity ->
       spawn(fn ->
         Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity)
       end)