[lib.content-controller] better notification
This commit is contained in:
parent
6dfa2b12e1
commit
225eef262e
|
@ -213,8 +213,13 @@ export default class ContentController{
|
|||
}
|
||||
|
||||
/* (7) Notification API -> if not current channel */
|
||||
if( room.messages.length > 0 && ri !== gs.get.content.rid )
|
||||
new Notification(`${room.messages.length} new messages in #${room.name}`);
|
||||
if( room.messages.length > 0 && ri !== gs.get.content.rid ){
|
||||
|
||||
let title = `Room #${room.name}`;
|
||||
let body = `${room.messages.length} new messages`;
|
||||
new Notification(title, { body: body });
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue