RocketChat / RocketChat/homeserver
Deprecate and remove findStateAtEvent method in StateService
Open
@debdutdeb is already working on this.
Since Oct 7, 2025.
- Dominant language
- TypeScript
- Stars
- 16
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
Description
The findStateAtEvent method in StateService is marked with a TODO comment indicating it should be removed.
Location: packages/federation-sdk/src/services/state.service.ts (around line 897)
Current State
The method is marked with // TODO: remove this and currently wraps getStateAtEvent.
Suggested Migration Path
- Add a JSDoc
@deprecatedannotation to the method pointing users togetStateAtEvent - Identify and migrate all callers to use
getStateAtEventdirectly - Remove commented-out tests in
state.service.spec.tsthat reference this TODO - Remove the method once all migrations are complete
Context
- PR: https://github.com/RocketChat/homeserver/pull/252
- Comment: https://github.com/RocketChat/homeserver/pull/252#discussion_r2410585212
- Requested by: @debdutdeb
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.