From 50f95900b62f08a07f040773441b9f74a0a50db1 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 11 Jan 2023 23:34:02 +0100 Subject: [PATCH] Update Push.tsx --- src/screens/Tabs/Me/Push.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/screens/Tabs/Me/Push.tsx b/src/screens/Tabs/Me/Push.tsx index 09c512bf..cf21c506 100644 --- a/src/screens/Tabs/Me/Push.tsx +++ b/src/screens/Tabs/Me/Push.tsx @@ -182,7 +182,7 @@ const TabMePush: React.FC = () => { } else { // Fix a bug for some users of v4.8.0 let authKey = push.key - if (push.key.length <= 10) { + if (push.key?.length <= 10) { authKey = fromByteArray(Random.getRandomBytes(16)) } // Turning on @@ -228,7 +228,7 @@ const TabMePush: React.FC = () => { body: { accountFull, serverKey: res.body.server_key, - auth: push.decode === false ? null : push.key + auth: push.decode === false ? null : authKey } })