Merge branch 'fix/autofollower-suggestions' into 'develop'
[akkoma] / lib / pleroma / web / activity_pub / activity_pub.ex
index 9c33775f2aa70c35da0bfd48c2879129523aec67..d17c892a7e2b6d6600220e37a2812176354d32fe 100644 (file)
@@ -827,7 +827,14 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
     query =
       from([activity] in query,
         where: fragment("not (? = ANY(?))", activity.actor, ^mutes),
-        where: fragment("not (?->'to' \\?| ?)", activity.data, ^mutes)
+        where:
+          fragment(
+            "not (?->'to' \\?| ?) or ? = ?",
+            activity.data,
+            ^mutes,
+            activity.actor,
+            ^user.ap_id
+          )
       )
 
     unless opts[:skip_preload] do