chore: Refactor audio notification helper (#6148)
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user