[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 */
|
/* (7) Notification API -> if not current channel */
|
||||||
if( room.messages.length > 0 && ri !== gs.get.content.rid )
|
if( room.messages.length > 0 && ri !== gs.get.content.rid ){
|
||||||
new Notification(`${room.messages.length} new messages in #${room.name}`);
|
|
||||||
|
let title = `Room #${room.name}`;
|
||||||
|
let body = `${room.messages.length} new messages`;
|
||||||
|
new Notification(title, { body: body });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue