diff options
author | Ivan Chen <ivan@tagg.id> | 2021-04-13 18:27:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-13 18:27:07 -0400 |
commit | 93837e23a169e6b17432e4e0dd397bcaa140bb5e (patch) | |
tree | cc5694a2684c7faeda360a7b239d976a4c60edbb /src/utils/messages.ts | |
parent | 1c7690a3b398e12834aa2aaa0b7c34c9e9a65821 (diff) | |
parent | d074b671293c8038935674ebfb990e844128cf07 (diff) |
Merge pull request #364 from shravyaramesh/chat-token-issue
[Bugfix] Stale chat token replaced
Diffstat (limited to 'src/utils/messages.ts')
-rw-r--r-- | src/utils/messages.ts | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/utils/messages.ts b/src/utils/messages.ts index dd29f317..f4215bf0 100644 --- a/src/utils/messages.ts +++ b/src/utils/messages.ts @@ -114,13 +114,10 @@ export const connectChatAccount = async ( export const getChatToken = async () => { try { - const currentChatToken = await AsyncStorage.getItem('chatToken'); - if (currentChatToken === null) { - const chatToken = await loadChatTokenService(); - await AsyncStorage.setItem('chatToken', chatToken); - } + const chatToken = await loadChatTokenService(); + await AsyncStorage.setItem('chatToken', chatToken); } catch (err) { - console.log(err); + console.log('Exception while loading chat token: ', err); } }; |