element-hq / element-hq/element-web

First message in a DM was not encrypted

Open
#28,094 5 comments 1 reaction 0 assignees View on GitHub
A-DM-Start A-E2EE O-Uncommon S-Critical T-Defect
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:

![image](https://github.com/user-attachments/assets/8fc6487d-3043-4e1a-b99e-a00a3d7f85c2)

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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.