Fix notifications not working (#2865)

* Fix notifications not working

* Transform into a manager

* Remove test accessor
This commit is contained in:
Daniel Espino García
2023-10-10 16:13:07 +02:00
committed by GitHub
parent 02261c9de3
commit 9aec7db821
9 changed files with 269 additions and 199 deletions

View File

@@ -12,7 +12,7 @@ import {Logger} from 'common/log';
import ServerManager from 'common/servers/serverManager';
import {ping} from 'common/utils/requests';
import {displayMention} from 'main/notifications';
import NotificationManager from 'main/notifications';
import {getLocalPreload, getLocalURLString} from 'main/utils';
import ModalManager from 'main/views/modalManager';
import MainWindow from 'main/windows/mainWindow';
@@ -116,7 +116,7 @@ export function handleWelcomeScreenModal() {
export function handleMentionNotification(event: IpcMainEvent, title: string, body: string, channel: {id: string}, teamId: string, url: string, silent: boolean, data: MentionData) {
log.debug('handleMentionNotification', {title, body, channel, teamId, url, silent, data});
displayMention(title, body, channel, teamId, url, silent, event.sender, data);
NotificationManager.displayMention(title, body, channel, teamId, url, silent, event.sender, data);
}
export function handleOpenAppMenu() {