Fix duplicate recipients
authorkPherox <admin@mail.kr-kp.com>
Wed, 30 Oct 2019 06:40:25 +0000 (15:40 +0900)
committerkPherox <admin@mail.kr-kp.com>
Wed, 30 Oct 2019 06:40:25 +0000 (15:40 +0900)
lib/pleroma/user/query.ex

index 2eda454bc7d6acef7da967602c1572b2a8020471..364bc1c898205f78d2886aaaf5db82dda5880c3e 100644 (file)
@@ -175,6 +175,7 @@ defmodule Pleroma.User.Query do
       [u, following: f, relationships: r],
       u.ap_id in ^to or (f.follower_address in ^to and r.state == "accept")
     )
+    |> distinct(true)
   end
 
   defp compose_query({:order_by, key}, query) do