element-hq / element-hq/element-web
First message in a DM was not encrypted
- Dominant language
- TypeScript
- Stars
- 13.5k
- Forks
- 2.8k
- PR merge metrics
- PR metrics pending
Description
### Steps to reproduce
1. Start new chat
2. Type mxid of other person, click Go
3. Type a message to the other person
### Outcome
#### What did you expect?
I expected all messages in this DM to be encrypted.
#### What happened instead?
The first message was not encrypted:

Source of that first event:
```
{
"content": {
"body": "Hi, thank you for looking at MSC3757, and sorry I have neglected it!",
"m.mentions": {},
"msgtype": "m.text"
},
"origin_server_ts": 1727188841453,
"sender": "@andybalaam:matrix.org",
"type": "m.room.message",
"unsigned": {
"membership": "join",
"age": 12541,
"transaction_id": "m1727188841284.81"
},
"event_id": "$RX_kUJTWDQL3DVE1fRkx2foUYt73DXpyaMlHRA73TXU",
"room_id": "!qKSwlzySCzuQreJffe:matrix.org"
}
```
Later messages in this DM were encrypted as expected.
### Operating system
Debian 12.7
### Browser information
Firefox 130.0
### URL for webapp
https://develop.element.io
### Application version
Element version: 787feca6a477-react-a1bdceed3e54-js-f8208b18916d Crypto version: Rust SDK 0.7.2 (7a21514), Vodozemac 0.7.0
### Homeserver
matrix.org
### Will you send logs?
Yes
Contributor guide
Assessment
This issue has not been assessed yet.