diff --git a/src/utils/notifications.ts b/src/utils/notifications.ts index f41edd24bb7e..f38d58207dcd 100644 --- a/src/utils/notifications.ts +++ b/src/utils/notifications.ts @@ -25,5 +25,5 @@ export function getLocalNotificationAccountDataEventType(deviceId: string): stri export function localNotificationsAreSilenced(cli: MatrixClient): boolean { const eventType = getLocalNotificationAccountDataEventType(cli.deviceId); const event = cli.getAccountData(eventType); - return event?.getContent()?.is_silenced ?? true; + return event?.getContent()?.is_silenced ?? false; } diff --git a/test/utils/notifications-test.ts b/test/utils/notifications-test.ts index b27a660ebfff..9e8a51ad3bda 100644 --- a/test/utils/notifications-test.ts +++ b/test/utils/notifications-test.ts @@ -47,8 +47,8 @@ describe('notifications', () => { }); describe('localNotificationsAreSilenced', () => { - it('defaults to true when no setting exists', () => { - expect(localNotificationsAreSilenced(mockClient)).toBeTruthy(); + it('defaults to false when no setting exists', () => { + expect(localNotificationsAreSilenced(mockClient)).toBeFalsy(); }); it('checks the persisted value', () => { mockClient.setAccountData(accountDataEventKey, { is_silenced: true });