Mute broadcast chunk notifications
This commit is contained in:
parent
6d6adc8c02
commit
cb4e444a60
3 changed files with 50 additions and 0 deletions
|
@ -50,6 +50,7 @@ import { localNotificationsAreSilenced, createLocalNotificationSettingsIfNeeded
|
|||
import { getIncomingCallToastKey, IncomingCallToast } from "./toasts/IncomingCallToast";
|
||||
import ToastStore from "./stores/ToastStore";
|
||||
import { ElementCall } from "./models/Call";
|
||||
import { VoiceBroadcastChunkEventType } from "./voice-broadcast";
|
||||
|
||||
/*
|
||||
* Dispatches:
|
||||
|
@ -77,6 +78,13 @@ const msgTypeHandlers = {
|
|||
[M_LOCATION.altName]: (event: MatrixEvent) => {
|
||||
return TextForEvent.textForLocationEvent(event)();
|
||||
},
|
||||
[MsgType.Audio]: (event: MatrixEvent): string | null => {
|
||||
if (event.getContent()?.[VoiceBroadcastChunkEventType]) {
|
||||
// mute broadcast chunks
|
||||
return null;
|
||||
}
|
||||
return TextForEvent.textForEvent(event);
|
||||
},
|
||||
};
|
||||
|
||||
export const Notifier = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue