From 2181bbb317f0edb8d9bc7579f8d2a9d4df08fb53 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Fri, 6 Apr 2018 14:29:56 +0200 Subject: [PATCH] [lib.content-controller] added audio notification POP when receiving another's message on the current channel --- webpack/lib/content-controller.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webpack/lib/content-controller.js b/webpack/lib/content-controller.js index 521d43c..6e034f5 100644 --- a/webpack/lib/content-controller.js +++ b/webpack/lib/content-controller.js @@ -396,6 +396,10 @@ export default class ContentController{ new Notification(title, { body: body }); } + // 9. If not self on current channel -> notification sound + if( room.messages.length > 0 && room.messages[0].uid !== auth.user.uid && ri === gs.get.content.rid ) + AudioManager.pop(); + }