From 67cae5fe450a8cf89835ea278603928480470051 Mon Sep 17 00:00:00 2001 From: ElementRobot Date: Tue, 11 Oct 2022 17:27:36 +0100 Subject: [PATCH 1/3] [Backport staging] use correct default for notification silencing (#9389) Co-authored-by: Kerry --- src/utils/notifications.ts | 2 +- test/utils/notifications-test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/notifications.ts b/src/utils/notifications.ts index f41edd24bb..f38d58207d 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 b27a660ebf..9e8a51ad3b 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 }); From 3c6fe5b6037c03cddcf26240fcfe731bfc4ce17e Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 11 Oct 2022 17:34:49 +0100 Subject: [PATCH 2/3] Prepare changelog for v3.58.1 --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e245f3646..edb088cd64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,13 @@ +Changes in [3.58.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.58.1) (2022-10-11) +===================================================================================================== + +## 🐛 Bug Fixes + * Use correct default for notification silencing ([\#9388](https://github.com/matrix-org/matrix-react-sdk/pull/9388)). Fixes vector-im/element-web#23456. + Changes in [3.58.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.58.0) (2022-10-11) =============================================================================================================== ## Deprecations - * Legacy Piwik config.json option `piwik.policy_url` is deprecated in favour of `privacy_policy_url`. Support will be removed in the next release. ## ✨ Features From f7159b859c9e64d8591c66ea72cf092c7eecb300 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 11 Oct 2022 17:34:49 +0100 Subject: [PATCH 3/3] v3.58.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5642124fb3..2c7fb8c005 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "3.58.0", + "version": "3.58.1", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": {