chore: Refactor audio notification helper (#6148)

This commit is contained in:
Pranav Raj S
2022-12-29 20:01:14 -08:00
committed by GitHub
parent 11f6e6bc61
commit cd3b6ebf28
10 changed files with 131 additions and 273 deletions

View File

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