Audit and validate event rejection checks that may no longer be necessary
@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
.rejectedproperty - An error is thrown based on
.rejectReasonor.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.tsline ~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
- PR: #252
- Comment: https://github.com/RocketChat/homeserver/pull/252#discussion_r2410607387
- Requested by: @debdutdeb
- 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
- 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.
More from RocketChat/homeserver
-
pruneEventDict and signEvent's `prune` flag should go away entirely, replaced byMay be free again @sampaiodiego claimed this 75 days ago, and no pull request is open. Opentodo :spiral_notepad: type: feature
RocketChat/homeserver#411 · 1 comment · 1 assignee ·
-
Include banned and invited servers in event destination setPossibly taken @ggazzo claimed this 233 days ago. Opentype: bug
Difficulty 4/5 3-5 days Newbie friendliness 52/100
RocketChat/homeserver#388 ·
-
we need a map of rooms and destinations to avoid having to get rooms state just to send an event to all servers in the room.May be free again @sampaiodiego claimed this 249 days ago, and no pull request is open. Opentodo :spiral_notepad: type: feature
RocketChat/homeserver#342 · 4 comments · 1 assignee ·
-
this may not be the best place to do this validationMay be free again @sampaiodiego claimed this 326 days ago, and no pull request is open. Opentodo :spiral_notepad:
RocketChat/homeserver#322 · 1 comment · 1 reaction · 1 assignee ·
-
check if all sendEventToAllServersInRoom should be followed by an emitterMay be free again @ggazzo claimed this 359 days ago, and no pull request is open. Opentodo :spiral_notepad:
RocketChat/homeserver#304 · 1 assignee ·
All issues in RocketChat/homeserver
Similar issues
-
bug
Difficulty 2/5 Half a day Newbie friendliness 68/100
amosblomqvist/learnharness#758 ·
Maintainers usually reply within 2 days
-
Change WorkspacesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
bitfocus/companion-module-renewedvision-propresenter-api#134 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
rcpch/digital-growth-charts-react-component-library#304 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
dsh-market/dsh-market#1210 · 1 comment ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
trustjonathan/STUDY-HUB#13 ·