Add NIP-44 verification to DM decrypt worker

This commit is contained in:
thePR0M3TH3AN committed 2026-01-19 09:40:51 -05:00
1 parent 2b79021184
commit 4cc51d7a79
5 files changed
+76 -8

No files matched your search

+4 -1
View File
@@ -353,7 +353,9 @@ function normalizeDirectMessageRecord(message, actorPubkey = "") {
: [];
const encryptionScheme =
typeof message?.scheme === "string"
typeof message?.encryption_scheme === "string"
? message.encryption_scheme.trim()
: typeof message?.scheme === "string"
? message.scheme.trim()
: typeof message?.decryptor?.scheme === "string"
? message.decryptor.scheme.trim()
@@ -442,6 +444,7 @@ function hydrateMessagesFromSnapshot(snapshot, actorPubkey = "") {
recipients: [],
direction: "unknown",
scheme: "",
encryption_scheme: "",
decryptor: { scheme: "", source: "snapshot" },
event: {
id: `dm-snapshot:${normalizedActor || "actor"}:${remote}:${timestamp}:${index}`,