element-hq / element-hq/synapse
`EventID` incorrectly inherits from `DomainSpecificString`
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#14638](https://github.com/matrix-org/synapse/issues/14638).
---
> Not super happy with the `startswith` but `EventID.is_valid` is broken for non-V1/2 event IDs so unsure how to proceed.
_Originally posted by @Fizzadar in https://github.com/matrix-org/synapse/pull/14632#discussion_r1042247889_
Modern event IDs are now hashes and do not include a domain name, so they shouldn't inherit from `DomainSepcificString`.
Contributor guide
Research direction
Start by locating the EventID and DomainSpecificString definitions, then trace EventID.is_valid for V1/V2 and modern event IDs. Done means EventID no longer inherits domain-specific behavior and validation handles modern hash-based IDs correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100