File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1246,9 +1246,15 @@ client
12461246 KEY sKey -> withQueue $ \ q _ -> either err (corrId,entId,) <$> secureQueue_ q sKey
12471247 RKEY rKeys -> withQueue $ \ q qr -> checkMode QMContact qr $ OK <$$ liftIO (updateKeys (queueStore ms) q rKeys)
12481248 LSET lnkId d ->
1249- withQueue $ \ q qr -> checkMode QMContact qr $ liftIO $ case queueData qr of
1250- Just (lnkId', _) | lnkId' /= lnkId -> pure $ Left AUTH
1251- _ -> OK <$$ addQueueLinkData (queueStore ms) q lnkId d
1249+ withQueue $ \ q QueueRec {queueMode, senderKey, queueData} ->
1250+ liftIO $ either err (corrId,entId,)
1251+ -- this check allows adding link data to contact addresses created prior to SKEY,
1252+ -- using `queueMode == Just QMContact` would prevent it, they have queueMode `Nothing`.
1253+ <$> if queueMode /= Just QMMessaging && isNothing senderKey
1254+ then case queueData of
1255+ Just (lnkId', _) | lnkId' /= lnkId -> pure $ Left AUTH
1256+ _ -> OK <$$ addQueueLinkData (queueStore ms) q lnkId d
1257+ else pure $ Left AUTH
12521258 LDEL ->
12531259 withQueue $ \ q qr -> checkMode QMContact qr $ liftIO $ case queueData qr of
12541260 Just _ -> OK <$$ deleteQueueLinkData (queueStore ms) q
You can’t perform that action at this time.
0 commit comments