mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-05 16:33:36 +00:00
fix surfacing decrypt error for nip17s once already cached
This commit is contained in:
1 parent
dcffee03af
commit
f6e149893b
1 file changed
+2
-3
@@ -74,7 +74,6 @@ interface DecryptedMessage extends NostrEvent {
|
||||
interface NIP17ProcessingResult {
|
||||
processedMessage: DecryptedMessage;
|
||||
conversationPartner: string;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
const DM_CONSTANTS = {
|
||||
@@ -344,11 +343,11 @@ export function DMProvider({ children, enableNIP17 = true }: DMProviderProps) {
|
||||
} as NostrEvent & { decryptedContent?: string; error?: string };
|
||||
}
|
||||
} else if (msg.kind === 1059) {
|
||||
const { processedMessage, error } = await processNIP17GiftWrap(msg);
|
||||
const { processedMessage } = await processNIP17GiftWrap(msg);
|
||||
return {
|
||||
...msg,
|
||||
decryptedContent: processedMessage.decryptedContent,
|
||||
error: error,
|
||||
error: processedMessage.error,
|
||||
} as NostrEvent & { decryptedContent?: string; error?: string };
|
||||
}
|
||||
return msg;
|
||||
|
||||
Reference in new issue
Block a user