- peers = from(u in Pleroma.User,
- select: fragment("distinct ?->'host'", u.info),
- where: u.local != ^true)
- |> Repo.all()
+ peers =
+ from(
+ u in User,
+ select: fragment("distinct split_part(?, '@', 2)", u.nickname),
+ where: u.local != ^true
+ )
+ |> Repo.all()
+ |> Enum.filter(& &1)
+