feat: Add audio alert for incoming messages on dashboard (#1738)

Fixes: #1345
This commit is contained in:
Nithin David Thomas
2021-03-04 19:24:03 +05:30
committed by GitHub
parent ca4a766b82
commit 9e8a943ec7
6 changed files with 115 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
import AuthAPI from '../api/auth';
import BaseActionCableConnector from '../../shared/helpers/BaseActionCableConnector';
import { newMessageNotification } from 'shared/helpers/AudioNotificationHelper';
class ActionCableConnector extends BaseActionCableConnector {
constructor(app, pubsubToken) {
@@ -63,6 +64,7 @@ class ActionCableConnector extends BaseActionCableConnector {
onLogout = () => AuthAPI.logout();
onMessageCreated = data => {
newMessageNotification(data);
this.app.$store.dispatch('addMessage', data);
};