diff --git a/packages/consumer/client.ts b/packages/consumer/client.ts index a2ea40d..c77c782 100644 --- a/packages/consumer/client.ts +++ b/packages/consumer/client.ts @@ -134,6 +134,7 @@ export class Consumer { }); yield { + key: record.uri.split("/").pop() as RecordKey, tid: memo.tid, text: decrypted, }; @@ -182,7 +183,11 @@ export class Consumer { length: record.contentLength, }); - const command = yield { tid: record.tid, text: decrypted }; + const command = yield { + key: event.commit.rkey, + tid: record.tid, + text: decrypted, + }; if (command === "stop") return; } diff --git a/packages/consumer/deno.jsonc b/packages/consumer/deno.jsonc index b19c22b..85a14db 100644 --- a/packages/consumer/deno.jsonc +++ b/packages/consumer/deno.jsonc @@ -1,6 +1,6 @@ { "name": "@cistern/consumer", - "version": "1.0.2", + "version": "1.0.3", "license": "MIT", "exports": { ".": "./mod.ts" diff --git a/packages/consumer/types.ts b/packages/consumer/types.ts index ebca44b..ea8c8a4 100644 --- a/packages/consumer/types.ts +++ b/packages/consumer/types.ts @@ -1,5 +1,5 @@ import type { BaseClientOptions, ClientRequirements } from "@cistern/shared"; -import type { ResourceUri, Tid } from "@atcute/lexicons"; +import type { RecordKey, ResourceUri, Tid } from "@atcute/lexicons"; /** * A locally-stored key pair suitable for storage @@ -34,6 +34,9 @@ export type ConsumerParams = ClientRequirements; /** A simplified, encrypted memo */ export interface DecryptedMemo { + /** Record key of this memo */ + key: RecordKey; + /** TID for when the memo was created */ tid: Tid;