Enable notifications for disappearing messages on macOS 12.0.1 and above
This commit is contained in:
parent
c8d32f0327
commit
62e9a1570a
2 changed files with 8 additions and 3 deletions
|
@ -7,6 +7,7 @@ import { Sound } from '../util/Sound';
|
|||
import {
|
||||
AudioNotificationSupport,
|
||||
getAudioNotificationSupport,
|
||||
shouldHideExpiringMessageBody,
|
||||
} from '../types/Settings';
|
||||
import * as OS from '../OS';
|
||||
import * as log from '../logging/log';
|
||||
|
@ -284,9 +285,7 @@ class NotificationService extends EventEmitter {
|
|||
notificationTitle = senderTitle;
|
||||
({ notificationIconUrl } = notificationData);
|
||||
|
||||
const shouldHideExpiringMessageBody =
|
||||
isExpiringMessage && (OS.isMacOS() || OS.isWindows());
|
||||
if (shouldHideExpiringMessageBody) {
|
||||
if (isExpiringMessage && shouldHideExpiringMessageBody()) {
|
||||
notificationMessage = i18n('newMessage');
|
||||
} else if (userSetting === NotificationSetting.NameOnly) {
|
||||
if (reaction) {
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
// Copyright 2018-2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import semver from 'semver';
|
||||
import os from 'os';
|
||||
|
||||
import * as OS from '../OS';
|
||||
import { isProduction } from '../util/version';
|
||||
|
||||
|
@ -61,3 +64,6 @@ export const isSystemTraySupported = (appVersion: string): boolean =>
|
|||
|
||||
export const isAutoDownloadUpdatesSupported = (): boolean =>
|
||||
OS.isWindows() || OS.isMacOS();
|
||||
|
||||
export const shouldHideExpiringMessageBody = (): boolean =>
|
||||
OS.isWindows() || (OS.isMacOS() && semver.lt(os.release(), '21.1.0'));
|
||||
|
|
Loading…
Reference in a new issue