Use correct logic to determine "attentions" list
[akkoma] / lib / pleroma / web / twitter_api / representers / activity_representer.ex
index 4f8f228ab87c68eee620f66a4ca7fbd0a76aa918..19b723586bd804f8382156594ad469d2531b6147 100644 (file)
@@ -158,7 +158,9 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
     mentions = opts[:mentioned] || []
 
     attentions =
-      activity.recipients
+      []
+      |> Utils.maybe_notify_to_recipients(activity)
+      |> Utils.maybe_notify_mentioned_recipients(activity)
       |> Enum.map(fn ap_id -> Enum.find(mentions, fn user -> ap_id == user.ap_id end) end)
       |> Enum.filter(& &1)
       |> Enum.map(fn user -> UserView.render("show.json", %{user: user, for: opts[:for]}) end)