Add sender DID resolution and self-decryption for chat messages

The messages API now resolves and includes sender DIDs for received messages, enabling proper decryption in the chat UI. The chat page adds logic to decrypt self-encrypted messages for sent items and improves V2 envelope handling, while useChatEncryption now serializes ratchet state before storage.
This commit is contained in:
Christopher
2026-01-27 22:06:47 -08:00
parent c8e4dedd61
commit 222f1c6d8a
3 changed files with 151 additions and 64 deletions
+2 -1
View File
@@ -612,7 +612,8 @@ export function useChatEncryption() {
// 5. Update Session
sessionsRef.current.set(sessionKey, newState);
await storeEncrypted(sessionKey, newState);
const serialized = await serializeRatchetState(newState);
await storeEncrypted(sessionKey, serialized);
return plaintext;