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.

Assessment

This issue has not been assessed yet.

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

Dominant language
TypeScript
Stars
17
Forks
18
Avg merge
2h 11m
Merged PRs (30d)
2

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

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.

More from RocketChat/homeserver

All issues in RocketChat/homeserver

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.