element-hq / element-hq/synapse
redundant top-level `membership` field in m.room.member events
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#6226](https://github.com/matrix-org/synapse/issues/6226).
---
When doing an initial `/sync`, the matrix.org homeserver returned the following event:
```json
{
"content": {
"avatar_url": "mxc://t2bot.io/07d8a5673f277eb13a7ceb68bc554fef",
"displayname": "pad (Telegram)",
"membership": "join"
},
"event_id": "$154217899961853PiOIa:t2bot.io",
"membership": "join",
"origin_server_ts": 1542178999598,
"sender": "@telegram_727304627:t2bot.io",
"state_key": "@telegram_727304627:t2bot.io",
"type": "m.room.member",
"unsigned": {
"age": 29364346302
}
}
```
This is a `State Event`. For some reason, it has both a top-level `membership` field (which it probably shouldn't?), and one inside the `content` (as required by the spec).
This is particularly strange because in almost all `m.room.member` events this will not occur, but it sometimes does, returning two `membership` fields rather than one. This is harmless for clients, but there may be some underlying bug in synapse?
Contributor guide
Assessment
This issue has not been assessed yet.