element-hq / element-hq/synapse
In Sliding Sync, Synapse accepts `null` in places where it shouldn't
Open
A-Spec-Compliance
A-Sync
O-Uncommon
S-Minor
T-Defect
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
We use `Something | None` in various places in the Pydantic request models for our MSC4186 Sliding Sync code. For example, all the extensions.
The thing is, the MSC doesn't say we should accept `null`. What we're really interested in is optional, non-nullable fields.
I will introduce something as part of MSC4354 Sticky Events that we can reuse here.
**UPDATE**: https://github.com/element-hq/synapse/pull/19591 introduces `Absent` with full Pydantic support, intended for this use case.
True as at v1.149.1.
Contributor guide
Assessment
This issue has not been assessed yet.