Bug: Unread polls badge incorrectly increments for historical polls on late join
What happened?
When a participant joins a conference that already has existing polls, the server
replays those polls as "history" (with history = true). The middleware correctly
passes notify = false for these historical polls and does not play a sound or show
a notification. However, the Redux reducer in features/polls/reducer.ts ignores
the notify flag entirely in the RECEIVE_POLL case and always increments
unreadPollsCount by 1 for every received poll — including historical ones.
As a result, a late-joining participant sees an inflated unread badge on the Polls tab equal to the number of polls that existed before they joined, even though none of those polls are actually "new" or "unread" for them. The badge only goes away when they manually open the Polls tab.
Root cause: In react/features/polls/reducer.ts (RECEIVE_POLL case, line 67),
the counter increments unconditionally:
unreadPollsCount: state.unreadPollsCount + 1It should be guarded by action.notify, which is already set correctly in
actions.ts (the receivePoll action creator) and already respected by the
middleware for the notification sound:
// middleware.ts line 81 — middleware does this correctly:
if (action.notify && (!isChatOpen || !isPollsTabFocused)) {
dispatch(playSound(INCOMING_MSG_SOUND_ID));
}
// middleware.ts line 118 — dispatched with notify = false for history:
dispatch(receivePoll(poll, !history));The one-line fix in the reducer would be:
unreadPollsCount: action.notify
? state.unreadPollsCount + 1
: state.unreadPollsCountPlatform
- Chrome (or Chromium based)
- Firefox
- Safari
- Other desktop browser
- Android browser
- iOS browser
- Electron app
- Android mobile app
- iOS mobile app
- Custom app using a mobile SDK
Browser / app / sdk version
Reproducible on current main branch (tested locally). Browser version not required — this is a logic bug in the Redux reducer, not browser-specific.
Relevant log output
No console errors — this is a silent UI state bug. The unread count badge
on the Polls tab shows an incorrect number greater than 0 immediately after
a late-joining participant joins. No exceptions are thrown.Reproducibility
- The problem is reproducible on meet.jit.si
More details?
Affected files:
- react/features/polls/reducer.ts (line 67) — RECEIVE_POLL case, root cause
- react/features/polls/actions.ts (line 59) — receivePoll() sets notify flag
- react/features/polls/middleware.ts (line 118) — dispatches receivePoll(poll, !history)
Steps to reproduce:
- Participant A opens a conference on meet.jit.si in Chrome.
- Participant A creates 3 polls via the Polls tab (do not close them).
- Participant B joins the same conference (late join).
- Participant B does NOT open the Polls tab.
- Observe: the Polls tab shows a badge with the number 3 for Participant B, even though those polls existed before they joined and no new poll was sent.
- The badge only disappears once Participant B clicks the Polls tab.
Expected: The unread badge should be 0 for a late-joining participant, since no polls were sent after they joined. Historical polls replayed on join should not count as "unread."
The notify flag is correctly set to false for history polls in the middleware but is never read by the reducer that updates the badge counter.
Source: jitsi/jitsi-meet