From 2c52c514c0b3afdcfa5d69854ddff99cc58f709a Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Sat, 2 Jul 2022 15:07:20 +0100 Subject: [PATCH] ntf: fix TRPL to send verification to the new token (#456) --- src/Simplex/Messaging/Notifications/Server.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Simplex/Messaging/Notifications/Server.hs b/src/Simplex/Messaging/Notifications/Server.hs index ffb475988..fcdc0e085 100644 --- a/src/Simplex/Messaging/Notifications/Server.hs +++ b/src/Simplex/Messaging/Notifications/Server.hs @@ -376,8 +376,9 @@ client NtfServerClient {rcvQ, sndQ} NtfSubscriber {newSubQ, smpAgent = ca} NtfPu atomically $ do removeTokenRegistration st tkn writeTVar tknStatus NTRegistered - addNtfToken st tknId tkn {token = token', tknRegCode = regCode} - writeTBQueue pushQ (tkn, PNVerification regCode) + let tkn' = tkn {token = token', tknRegCode = regCode} + addNtfToken st tknId tkn' + writeTBQueue pushQ (tkn', PNVerification regCode) withNtfLog $ \s -> logUpdateToken s tknId token' regCode pure NROk TDEL -> do