quotient-im / libQuotient

A Qt library to write cross-platform clients for Matrix
https://quotient-im.github.io/libQuotient/
GNU Lesser General Public License v2.1
135 stars 56 forks source link

Room keys not stored when room doesn't yet exist #652

Open TobiasFella opened 1 year ago

TobiasFella commented 1 year ago
  1. A invites B to a room and sends a message
  2. (in some situations) B will receive the to-device message with the key before receiving the invitation to the room, causing libquotient to not store the room key
  3. Profit :)
KitsuneRal commented 1 year ago

Ooph... While rebasing the per-connection E2EE code a couple of hours ago, it occurred to me that holding Megolm keys in a dictionary inside the ConnectionEncryptionData object might make the Room code less cumbersome. This is apparently the case to move those keys there and store them whether a room with a given id exists or not.