Skip to content

fix: prevent duplicate live notifications from /watching - #7216

Merged
pajlada merged 2 commits into
Chatterino:masterfrom
3r01:fix-watching-live-notification
Sep 6, 2026
Merged

pajlada merged 2 commits into
Chatterino:masterfrom
3r01:fix-watching-live-notification

Conversation

@3r01

@3r01 3r01 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Fixes #7164.

Live notifications trigger when channel is opened in /watching

Steps to reproduce:

  1. Add channel c to the live notifications.
  2. (disable suppress live notifications on startup - makes it easier to debug when launching/closing)
  3. Remove all tabs with c.
  4. Add a /watching tab.
  5. Restart Chatterino (if you previously had a tab with c).
  6. Wait for c to go live.
  7. Observe a live notification.
  8. Open c in the browser.
  9. ⚡ Observe another live notification.

We shouldn't've sent the second notification. The reason we did is that we create a new TwitchChannel when the /watching channel changes to c. There, we fetch the live status and issue a notification.

Fixed by tracking the last notified stream ID per channel and ignoring subsequent duplicate calls.

Added a test that covers various possible state changes, including the one described in the original issue.

Comment thread src/controllers/notifications/NotificationController.hpp
@pajlada
pajlada enabled auto-merge (squash) September 6, 2026 10:52
@pajlada
pajlada merged commit 5c9fb8b into Chatterino:master Sep 6, 2026
18 checks passed
@3r01
3r01 deleted the fix-watching-live-notification branch September 11, 2026 14:04
babicekmarek pushed a commit to babicekmarek/streamally-chatterino that referenced this pull request Sep 14, 2026
…7216)

Reported-by: Nerixyz
Reviewed-by: pajlada <rasmus.karlsson@pajlada.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Live notifications trigger when channel is opened in /watching

2 participants