RocketChat / RocketChat/homeserver

Deprecate and remove findStateAtEvent method in StateService

Open
#254 0 comments 0 reactions 1 assignee View on GitHub

@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

  1. Add a JSDoc @deprecated annotation to the method pointing users to getStateAtEvent
  2. Identify and migrate all callers to use getStateAtEvent directly
  3. Remove commented-out tests in state.service.spec.ts that reference this TODO
  4. Remove the method once all migrations are complete

Context

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.