Encrypted, ephemeral, private memos on atproto

fix(consumer): return record key in DecryptedMemo

graham.systems 993ba750 6e175b7d

verified
Changed files
+11 -3
packages
+6 -1
packages/consumer/client.ts
··· 134 134 }); 135 135 136 136 yield { 137 + key: record.uri.split("/").pop() as RecordKey, 137 138 tid: memo.tid, 138 139 text: decrypted, 139 140 }; ··· 182 183 length: record.contentLength, 183 184 }); 184 185 185 - const command = yield { tid: record.tid, text: decrypted }; 186 + const command = yield { 187 + key: event.commit.rkey, 188 + tid: record.tid, 189 + text: decrypted, 190 + }; 186 191 187 192 if (command === "stop") return; 188 193 }
+1 -1
packages/consumer/deno.jsonc
··· 1 1 { 2 2 "name": "@cistern/consumer", 3 - "version": "1.0.2", 3 + "version": "1.0.3", 4 4 "license": "MIT", 5 5 "exports": { 6 6 ".": "./mod.ts"
+4 -1
packages/consumer/types.ts
··· 1 1 import type { BaseClientOptions, ClientRequirements } from "@cistern/shared"; 2 - import type { ResourceUri, Tid } from "@atcute/lexicons"; 2 + import type { RecordKey, ResourceUri, Tid } from "@atcute/lexicons"; 3 3 4 4 /** 5 5 * A locally-stored key pair suitable for storage ··· 34 34 35 35 /** A simplified, encrypted memo */ 36 36 export interface DecryptedMemo { 37 + /** Record key of this memo */ 38 + key: RecordKey; 39 + 37 40 /** TID for when the memo was created */ 38 41 tid: Tid; 39 42