From c6b6144d2a004393148c1e8fd55c06c5de147baf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tao=20Bror=20Bojl=C3=A9n?= Date: Sat, 31 Aug 2019 20:24:53 +0100 Subject: [PATCH] fix #97 - insular instances on graph --- CHANGELOG.md | 1 + backend/lib/backend/api.ex | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5451bee..94c1796 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Display plain Pleroma version rather than the Mastodon-compatible string +- Fix some insular instances appearing on the graph ### Security diff --git a/backend/lib/backend/api.ex b/backend/lib/backend/api.ex index cabd619..39d6cff 100644 --- a/backend/lib/backend/api.ex +++ b/backend/lib/backend/api.ex @@ -75,6 +75,8 @@ defmodule Backend.Api do user_threshold = get_config(:personal_instance_threshold) Instance + # filter down to instances that have edges + |> join(:inner, [i], e in Edge, on: i.domain == e.source_domain or i.domain == e.target_domain) |> where( [i], not is_nil(i.x) and not is_nil(i.y) and not is_nil(i.user_count) and