summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-07-17 14:08:53 -0400
committerJune McEnroe <june@causal.agency>2020-07-17 14:08:53 -0400
commitf343150fb4ea1d553fb2220d023648bb670ee8fa (patch)
tree0efe0c4d73cfd23a27ca8050f9d45f3d2bc1eb24
parentAdd export option (diff)
downloadscooper-f343150fb4ea1d553fb2220d023648bb670ee8fa.tar.gz
scooper-f343150fb4ea1d553fb2220d023648bb670ee8fa.zip
Filter networks with only private contexts
Diffstat (limited to '')
-rw-r--r--networks.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/networks.c b/networks.c
index 91f5131..f1f8c89 100644
--- a/networks.c
+++ b/networks.c
@@ -37,6 +37,7 @@ const char *NetworksQuery = SQL(
 	), allNetworks AS (
 		SELECT DISTINCT network
 		FROM contexts
+		WHERE query <= NOT :public
 		ORDER BY network COLLATE NOCASE
 	)
 	SELECT network, 1 FROM activeNetworks
@@ -59,6 +60,7 @@ enum kcgi_err networksPage(struct kreq *req) {
 
 	sqlite3_reset(stmt.networks);
 	dbBindInt(stmt.networks, ":recent", contextsRecent);
+	dbBindInt(stmt.networks, ":public", contextsPublic);
 
 	enum State {
 		None,