commit 72c19fc411137a950cb39bae2f011c0368482f12
parent 24c3e61a4bd57ed64edee704416bb3c6598deabe
Author: Daniel D’Aquino <daniel@daquino.me>
Date: Fri, 17 Jan 2025 20:00:21 +0900
Unsubscribe from push notifications on logout
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 <daniel@daquino.me>
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git 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()