RocketChat / RocketChat/Rocket.Chat

Message separator currently displays date instead of “Today” for current day messages

Open
#40,588 2 comments 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

Description

In the chat message list, the date separator currently displays the full formatted date even for messages sent on the current day.

Example: MAY 17, 2026
Instead, it should display a more user-friendly label such as: Today

Current Behavior

The MessageSeparator component always formats the separator using:

t('message_separator_date', {
  val: new Date(date),
  formatParams: {
    val: {
      month: 'short',
      day: '2-digit',
      year: 'numeric',
    },
  },
})

As a result, today's messages also show the full date.

Expected Behavior

Current day messages should display: Today
Previous day messages can optionally display: Yesterday
Older messages should continue displaying formatted dates.

Suggested Fix

Update the MessageSeparator component to check whether the message date belongs to the current day before formatting the date.

before applying the default date formatter.

Example:
if (isToday(date)) return t('today');
if (isYesterday(date)) return t('yesterday');

Benefits

  • Improves readability and UX
  • Matches common chat application behavior (WhatsApp, Slack, Discord, etc.)
  • Makes recent conversations easier to understand quickly

Affected Component

MessageSeparator

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

Start by locating the MessageSeparator component and reading the date-formatting call described in the issue. Verify how current, previous, and older message dates are rendered; done means current-day messages show “Today” while older messages retain the expected date format.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.