···674674 foreign key (vouch_id) references vouches(id) on delete cascade
675675 );
676676677677+ create table if not exists vouch_skips (
678678+ did text not null,
679679+ subject_did text not null,
680680+ created_at text not null default (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
681681+ primary key (did, subject_did),
682682+ check (did <> subject_did)
683683+ );
684684+685685+677686 create table if not exists migrations (
678687 id integer primary key autoincrement,
679688 name text unique
+11-1
appview/db/vouch.go
···308308 return batch[subjectDid], nil
309309}
310310311311+func SkipVouchSuggestion(e Execer, did, subjectDid string) error {
312312+ _, err := e.Exec(
313313+ `insert or ignore into vouch_skips (did, subject_did) values (?, ?)`,
314314+ did, subjectDid,
315315+ )
316316+ return err
317317+}
318318+311319// priority:
312320// 1. collaborator invites sent
313321// 2. knot member invites sent
···390398 )
391399 where did not in (
392400 select subject_did from vouches where vouches.did = ?
401401+ union
402402+ select subject_did from vouch_skips where vouch_skips.did = ?
393403 )
394404 group by did
395405 order by min(priority) asc, max(created) desc
···405415 did, did, // issue_comments
406416 did, did, // follows
407417 did, did, // stars
408408- did, // vouches exclusion
418418+ did, did, // existing vouches + skips exclusion
409419 limit,
410420 }
411421