From 72c19fc411137a950cb39bae2f011c0368482f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20D=E2=80=99Aquino?= Date: Fri, 17 Jan 2025 20:00:21 +0900 Subject: [PATCH] Unsubscribe from push notifications on logout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://github.com/damus-io/damus/issues/1707 Changelog-Fixed: Fixed issue where users continue to receive push notifications after logout Signed-off-by: Daniel D’Aquino --- damus/Models/DamusState.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/damus/Models/DamusState.swift b/damus/Models/DamusState.swift index f77191f9..5ff02cab 100644 --- a/damus/Models/DamusState.swift +++ b/damus/Models/DamusState.swift @@ -175,6 +175,9 @@ class DamusState: HeadlessDamusState { func close() { print("txn: damus close") + Task { + try await self.push_notification_client.revoke_token() + } wallet.disconnect() pool.close() ndb.close()