!Enum.member?(
activity.data["to"],
User.get_by_ap_id(activity.data["actor"]).follower_address
- ), do: Pleroma.Web.Streamer.stream("direct", activity)
+ ),
+ do: Pleroma.Web.Streamer.stream("direct", activity)
end
end
end
cc = object["cc"] || []
cond do
- public in to -> "public"
- public in cc -> "unlisted"
- # this should use the sql for the object's activity
- Enum.any?(to, &String.contains?(&1, "/followers")) -> "private"
- true -> "direct"
+ public in to ->
+ "public"
+
+ public in cc ->
+ "unlisted"
+
+ # this should use the sql for the object's activity
+ Enum.any?(to, &String.contains?(&1, "/followers")) ->
+ "private"
+
+ true ->
+ "direct"
end
end
end