Hide direct call notification when window is active

This commit is contained in:
Evan Hahn 2020-12-17 17:13:00 -06:00 committed by Scott Nonnenberg
parent 8ace4b6321
commit 8144d758ae

View file

@ -468,8 +468,9 @@ async function showCallNotification(
title: string,
isVideoCall: boolean
): Promise<void> {
const canNotify = await window.getCallSystemNotification();
if (!canNotify) {
const shouldNotify =
!window.isActive() && (await window.getCallSystemNotification());
if (!shouldNotify) {
return;
}
notify({