RocketChat / RocketChat/Rocket.Chat

Wrong parameter types for timestampFromIsoTime in message parser

Open
#39,375 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

The timestampFromIsoTime function in utils.ts expects parameters like year, month, etc. as string[], but the grammar always passes them as plain strings. This type mismatch could cause confusion or bugs. Please update the parameter types to string instead of string[].

Actual behavior:

  • Function signature uses string[] for parameters.
  • Called with plain string values.

Expected behavior:

  • Function should use string for all parameters to match how it’s called.

Contributor guide

Open the 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.

Research direction

Locate timestampFromIsoTime in utils.ts and inspect how the message grammar calls it. Update the parameter types to match the plain string values described in the issue, then run the relevant TypeScript checks or parser tests to confirm the mismatch is gone.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.