~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

Owners' notifications name the index their blocks and hides are read by

Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:serve/notifications-moderation-indexed
crates/knotless-serve/src/index.rs+7−4
@@ -2346,11 +2346,14 @@ impl Index {
FROM pref p, json_each(p.value, '$.off') j
WHERE p.did = ?1 AND p.kind = 'notifications'))
AND f.author NOT IN (SELECT subject FROM block WHERE did = f.repo_did)
AND NOT EXISTS (SELECT 1 FROM forge o
-- By `forge_moderation`, named, for its few rows: left to
-- choose, SQLite takes `forge_repo_created`, as good for its
-- columns, where it was made later, as on prod, and so reads
-- every record of the repository for each heard of. The
-- `instr` beside it is the index's own `WHERE`, to use it.
AND NOT EXISTS (SELECT 1 FROM forge o INDEXED BY forge_moderation
WHERE o.author = f.repo_did AND o.repo_did = f.repo_did
AND o.repo_key = f.repo_key
-- As `forge_moderation` says, for its few rows: without
-- it, every record of the repository, for each heard of.
AND (instr(o.uri, '/dev.knotless.block/') OR instr(o.uri, '/dev.knotless.hide/'))
AND ((instr(o.uri, '/dev.knotless.block/')
AND o.value ->> '$.subject' = f.author)
@@ -2404,7 +2407,7 @@ impl Index {
AND NOT (EXISTS (SELECT 1 FROM mention m WHERE m.uri = w.uri AND m.did = ?1)
AND 'mention' NOT IN off)
AND w.author NOT IN (SELECT subject FROM block WHERE did = w.repo_did)
AND NOT EXISTS (SELECT 1 FROM forge o
AND NOT EXISTS (SELECT 1 FROM forge o INDEXED BY forge_moderation
WHERE o.author = w.repo_did AND o.repo_did = w.repo_did
AND o.repo_key = w.repo_key
AND (instr(o.uri, '/dev.knotless.block/') OR instr(o.uri, '/dev.knotless.hide/'))