RocketChat / RocketChat/homeserver

Audit and validate event rejection checks that may no longer be necessary

Open
#255 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

Context

Following the refactor in #252, specifically the discussion at https://github.com/RocketChat/homeserver/pull/252#discussion_r2410607387, we need to audit all places where events are checked for rejection and errors are rethrown.

Task

Check and validate all places in the codebase where:

  • An event is checked using .rejected property
  • An error is thrown based on .rejectReason or .rejectedReason

According to @debdutdeb, these checks should no longer be necessary after the state calculation refactor.

Location Examples

  • packages/federation-sdk/src/services/room.service.ts line ~929-933
  • Search for patterns like if (.*event.*\.rejected) across the codebase

Expected Outcome

Either:

  • Remove unnecessary rejection checks if they're redundant
  • Document why certain checks are still needed
  • Ensure proper error handling is in place where rejection checks are removed

Related

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.