Retro Bulletin Board Systems on atproto. Web app and TUI. lazy mirror of alyraffauf/atbbs atbbs.xyz
forums python tui atproto bbs
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

web/writes: remove deleted thread from cache

+8 -1
+8 -1
web/src/lib/writes.ts
··· 3 3 import type { Client } from "@atcute/client"; 4 4 import { SITE, BOARD, POST, BAN, HIDE, PIN, PROFILE } from "./lexicon"; 5 5 import { invalidateAllBBSCaches } from "./bbs"; 6 + import { queryClient } from "./queryClient"; 6 7 import { nowIso } from "./util"; 7 8 import { getCurrentUser } from "./auth"; 8 9 import type { ··· 102 103 collection: string, 103 104 rkey: string, 104 105 ) { 106 + const did = currentDid(); 105 107 const resp = await rpc.post("com.atproto.repo.deleteRecord", { 106 108 input: { 107 - repo: currentDid(), 109 + repo: did, 108 110 collection: asNsid(collection), 109 111 rkey, 110 112 }, 111 113 }); 112 114 assertOk(resp, "deleteRecord"); 115 + // Drop the per-record cache entry from the cache 116 + queryClient.removeQueries({ 117 + queryKey: ["record", did, collection, rkey], 118 + exact: true, 119 + }); 113 120 return resp; 114 121 } 115 122