core: fix connecting via short links

This commit is contained in:
Evgeny Poberezkin 2025-04-23 13:09:16 +01:00
parent 52e2af6e32
commit 96b962809f
No known key found for this signature in database
GPG key ID: 494BDDD9A28B577D

View file

@ -3159,9 +3159,9 @@ processChatCommand' vr = \case
hash :: ConnReqContact -> ConnReqUriHash
hash = ConnReqUriHash . C.sha256Hash . strEncode
getShortLinkConnReq :: User -> ConnShortLink m -> CM (ConnectionRequestUri m)
getShortLinkConnReq User {userId} l = do
getShortLinkConnReq user l = do
l' <- restoreShortLink' l
(cReq, cData) <- withAgent (\a -> getConnShortLink a userId l')
(cReq, cData) <- withAgent (\a -> getConnShortLink a (aUserId user) l')
case cData of
ContactLinkData {direct} | not direct -> throwChatError CEUnsupportedConnReq
_ -> pure ()