From 35d1c0d980b785ac43ef45b4b4cab4e0c00fe988 Mon Sep 17 00:00:00 2001 From: Alexandru M Stan Date: Thu, 24 Dec 2020 02:01:40 -0800 Subject: [PATCH] webplatform: Fix notification closing After a notification arrives, when the user focuses on element, the notification never goes away (unless directly interacted with), this was a bug. displayNotification was never returning the notification handle, which means that matrix-react-sdk later on had no way to .close it. Closes #16026 Signed-off-by: Alexandru M Stan --- src/vector/platform/WebPlatform.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vector/platform/WebPlatform.ts b/src/vector/platform/WebPlatform.ts index 2e739a266..ee399c8c8 100644 --- a/src/vector/platform/WebPlatform.ts +++ b/src/vector/platform/WebPlatform.ts @@ -89,6 +89,8 @@ export default class WebPlatform extends VectorBasePlatform { window.focus(); notification.close(); }; + + return notification; } _getVersion(): Promise {