fix notifications (?)
This commit is contained in:
parent
98cb260ff5
commit
86ad93b318
1 changed files with 8 additions and 3 deletions
|
@ -240,11 +240,16 @@ const app = new Vue({
|
|||
}
|
||||
|
||||
if (messageObject.author.username !== this.loggedInUser.username && messageObject.category._id !== this.selection.category._id) {
|
||||
if (Notification.permission === 'granted') {
|
||||
new Notification(`${messageObject.category.title}/${messageObject.author.username}`, messageObject.content);
|
||||
}
|
||||
this.okNotification(`${messageObject.category.title}/${messageObject.author.username}: ${messageObject.content}`);
|
||||
}
|
||||
|
||||
if (messageObject.author.username !== this.loggedInUser.username) {
|
||||
if (Notification.permission === 'granted') {
|
||||
new Notification(`${messageObject.category.title}/${messageObject.author.username}`, {
|
||||
body: messageObject.content
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
openChatForCategory: async function(categoryId) {
|
||||
this.gateway.subscribeToCategoryChat(categoryId);
|
||||
|
|
Reference in a new issue