Approved Don't show "tournament created" browser notifications if the room tournament has started/ended

DaWoblefet

Demonstrably so
is a Smogon Social Media Contributoris a Top Researcheris a Tiering Contributoris a Battle Simulator Moderator
When refreshing Showdown, I often get notifications about tournaments from the various rooms I'm in, which is good if the tournament has just been created and signups are open. However, I'm pretty sure Showdown only checks if a tournament|create is present in the chatroom anywhere, because I'll get notifications about tournaments well after they've ended. For example, when refreshing in the Smogon Doubles room at [10:01:52] on July 13, I get a notification that a tournament has been created, despite the room tournament being created at [21:31:16] on July 12, about 13.5 hours ago, and having ended around 13 hours ago at [21:56:43]. It's fairly annoying to get notifications for tournaments that I can't join, but especially annoying if it's been over for a long time. Here's a screenshot of what I mean:
185714

After the server sends tournament|start or is forceended with tournament|forceend before a start is sent, I think the tournament browser notification should not be sent. I believe the logic for correcting this should be around here.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top