TwitterAPI: support follow activities without published date.
[akkoma] / lib / pleroma / web / common_api / utils.ex
index ea95c134c8d47eca8bce41e5609a385ed6c8b690..75c63e5f418bc79ed8938e59d94cc0c3e08b9a1e 100644 (file)
@@ -27,7 +27,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
   def to_for_user_and_mentions(user, mentions, inReplyTo, "public") do
     to = ["https://www.w3.org/ns/activitystreams#Public"]
 
-    mentioned_users = Enum.map(mentions, fn ({_, %{ap_id: ap_id}}) -> ap_id end) ++ [user.ap_id]
+    mentioned_users = Enum.map(mentions, fn ({_, %{ap_id: ap_id}}) -> ap_id end)
     cc = [user.follower_address | mentioned_users]
     if inReplyTo do
       {to, Enum.uniq([inReplyTo.data["actor"] | cc])}
@@ -47,7 +47,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
   end
 
   def to_for_user_and_mentions(user, mentions, inReplyTo, "direct") do
-    mentioned_users = Enum.map(mentions, fn ({_, %{ap_id: ap_id}}) -> ap_id end) ++ [user.ap_id]
+    mentioned_users = Enum.map(mentions, fn ({_, %{ap_id: ap_id}}) -> ap_id end)
     if inReplyTo do
       {Enum.uniq([inReplyTo.data["actor"] | mentioned_users]), []}
     else