MCPcopy Create free account
hub / github.com/block/buzz / write

Function write

desktop/src/features/channels/unreadRootIdStore.ts:19–28  ·  view source on GitHub ↗
(pubkey: string, rootIds: Set<string>)

Source from the content-addressed store, hash-verified

17 }
18 },
19 write(pubkey: string, rootIds: Set<string>): void {
20 try {
21 const arr = [...rootIds];
22 const capped =
23 arr.length > maxEntries ? arr.slice(arr.length - maxEntries) : arr;
24 window.localStorage.setItem(storageKey(pubkey), JSON.stringify(capped));
25 } catch {
26 // Ignore storage errors (private browsing, quota exceeded).
27 }
28 },
29 };
30}

Calls 1

storageKeyFunction · 0.70