"You should only request consent to display notifications in response to a user gesture (e.g. clicking a button). This is not only best practice — you should not be spamming users with notifications they didn't agree to — but going forward browsers will explicitly disallow notification permission requests not triggered in response to a user gesture. Firefox is already doing this from version 72, for example, and Safari has done it for some time."
Add simple chat notifications. Modify the title of the browser tab, when it is inactive, showing the number of new messages. This is cleared up when the tab is active again.