Skip to content

Fix broken notifications with bots

z411 requested to merge z411/notif-fix into master

Currently notifications are broken whenever the client of a notification is not a real client (e.g. bot). This means that spectators of a bot don't get their NOTIF_ONE notifications, and bot's team mates don't get NOTIF_TEAM and NOTIF_TEAM_EXCEPT notifications either, even if they are real clients. This commit fixes this by moving the real client check to the individual Notification_ShouldSend function.

The only case where it makes sense to not create the notification at all is with NOTIF_ONE_ONLY; in every other case we can't be sure if there are other real clients (spectators, team mates) who need to get the notification still, so it's better to create it first and check it later.

Merge request reports