mirror of
https://github.com/Skylar-Tech/node-red-contrib-matrix-chat.git
synced 2026-05-25 08:33:38 -06:00
bc97c564d3
matrix-js-sdk's LocalStorageCryptoStore.getEndToEndSessionsBatch() returns olm sessions without the deviceKey/sessionId fields, since those live only in the storage key path. initRustCrypto()'s migration then assigns the undefined deviceKey to PickledSession.senderKey and crashes in the WASM setter with "Cannot read properties of undefined (reading 'length')". The IndexedDB backend embeds those fields in the record and is unaffected, which is why this only hit installs that were started on the legacy localStorage crypto store. Patch the instance to re-derive deviceKey/sessionId from the crypto.sessions/<deviceKey> keys before returning a batch, so both the migration and its delete-after-migrate step work.