Message aggregator panels show a date divider above every message

Aperta
#1,466 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Jaivansh-777 ci sta già lavorando.

Dal 27/11/2026.

  • #1468 di @Jaivansh-777 — aperta

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
1/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
javascript, react
Ambito
frontend

Direzione di ricerca

The issue points to packages/react/src/views/MessageAggregators/common/MessageAggregator.js and names ThreadMessageList as a comparison. Read the isMessageNewDay logic and check how the message list is filtered; done means same-day messages share one date divider, matching the main chat. A linked pull request (#1468) is already open.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Description:

In Pinned, Starred, Mentions, Threads and Search, a date divider shows up above every single message, even when they're all from the same day.

isMessageNewDay in packages/react/src/views/MessageAggregators/common/MessageAggregator.js:

const isMessageNewDay = (current, previous) =>
  !previous ||
  shouldRender(previous) ||
  !isSameDay(new Date(current.ts), new Date(previous.ts));

The list this runs over comes from useSetMessageList, which already does messages.filter(shouldRender). So shouldRender(previous) is always true after the first message, and every message gets a divider.

Steps to reproduce:
  1. Pin (or star) two or more messages sent on the same day
  2. Open the Pinned (or Starred) panel
Expected behavior:

One date divider per day, like in the main chat.

Actual behavior:

A date divider above every message.

Fix is a one-liner: drop shouldRender(previous) || so it's just !previous || !isSameDay(...), which is what ThreadMessageList already does. I'll open a PR.

Lingua principale
JavaScript
Stelle
171
Fork
421
Merge medio
3g 6h
PR unite (30g)
4

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di RocketChat/EmbeddedChat

Tutte le issue di RocketChat/EmbeddedChat

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.