Notices where this attachment appears
-
SELECT a0."id", a0."data", a0."local", a0."actor", a0."recipients", a0."inserted_at", a0."updated_at", b2."id", b2."user_id", b2."activity_id", b2."inserted_at", b2."updated_at", o1."id", o1."data", o1."inserted_at", o1."updated_at", NOT (t3."id" IS NULL) FROM "activities" AS a0 INNER JOIN "objects" AS o1 ON (o1."data"->>'id') = associated_object_id(a0."data") LEFT OUTER JOIN "bookmarks" AS b2 ON (b2."user_id" = $1) AND (b2."activity_id" = a0."id") LEFT OUTER JOIN "thread_mutes" AS t3 ON (t3."user_id" = $2) AND (t3."context" = a0."data"->>'context') INNER JOIN "users" AS u4 ON (a0."actor" = u4."ap_id") AND (u4."is_active" = TRUE) INNER JOIN "users" AS u5 ON (a0."actor" = u5."ap_id") AND (u5."invisible" = FALSE) WHERE ((($3 && a0."recipients")) OR (a0."actor" = $4)) AND (a0."data"->>'type' = ANY($5)) AND (not (a0."actor" = ANY($6))) AND (((not (a0."recipients" && $7)) or a0."actor" = $8)) AND ((recipients_contain_blocked_domains(a0."recipients", $9) = false) or a0."actor" = $10) AND (not (a0."data"->>'type' = 'Announce' and a0."data"->'to' ?| $11)) AND ((not (split_part(a0."actor", '/', 3) = ANY($12))) or a0."actor" = ANY($13)) AND ((not (split_part(o1."data"->>'actor', '/', 3) = ANY($14))) or (o1."data"->>'actor') = ANY($15)) AND (not ( a0."data"->>'type' = 'Announce' and a0."actor" = ANY($16))) AND (a0."data"->>'type' != 'Announce' or o1."data"->>'actor' != $17) AND (not(o1."data"->>'type' = 'Answer')) AND (not(o1."data"->>'type' = 'ChatMessage')) ORDER BY a0."id" desc nulls last LIMIT $18