Full document, spreadsheet, slideshow, and diagram tooling
0
fork

Configure Feed

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

Merge pull request 'fix: store key string in localStorage during PDS pull sync' (#24) from fix/pull-sync-key-store into main

scott c4b0ce73 7c06ed75

+10 -1
+10 -1
src/lib/pds-pull-sync.ts
··· 5 5 6 6 import type { Agent } from '@atproto/api'; 7 7 import { listPdsDocuments, loadDocumentFromPds } from './pds-documents.js'; 8 - import { getDocument } from './local-store.js'; 8 + import { getDocument, getDocKey } from './local-store.js'; 9 9 import { isPdsReady } from './pds-setup.js'; 10 10 import { getSession } from './auth.js'; 11 + import { exportKey } from './crypto.js'; 12 + import { storeKey } from './key-sync.js'; 11 13 12 14 export async function pullRemoteDocuments(): Promise<number> { 13 15 if (!isPdsReady()) return 0; ··· 35 37 created_at: remote.createdAt, 36 38 updated_at: remote.updatedAt, 37 39 }); 40 + 41 + const docKey = await getDocKey(remote.rkey); 42 + if (docKey) { 43 + const keyStr = await exportKey(docKey); 44 + await storeKey(remote.rkey, keyStr); 45 + } 46 + 38 47 pulled++; 39 48 } catch (err) { 40 49 console.warn(`Failed to pull document ${remote.rkey} from PDS:`, err);