mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-15 08:05:49 +00:00
Merge branch 'master' into short-links
This commit is contained in:
@@ -1857,7 +1857,7 @@ processChatCommand' vr = \case
|
||||
withFastStore $ \db -> (,) <$> getUserAddress db user <*> getUserAddressConnection db vr user
|
||||
when (isJust sLnk_) $ throwCmdError "address already has short link"
|
||||
-- TODO [short links] set ContactShortLinkData
|
||||
sLnk <- shortenShortLink' =<< withAgent (\a -> setContactShortLink a (aConnId conn) "" Nothing)
|
||||
sLnk <- shortenShortLink' =<< withAgent (\a -> setConnShortLink a (aConnId conn) SCMContact "" Nothing)
|
||||
case entityId conn of
|
||||
Just uclId -> do
|
||||
withFastStore' $ \db -> setUserContactLinkShortLink db uclId sLnk
|
||||
@@ -2464,7 +2464,7 @@ processChatCommand' vr = \case
|
||||
when (isJust sLnk_) $ throwCmdError "group link already has short link"
|
||||
let crClientData = encodeJSON $ CRDataGroup gLinkId
|
||||
-- TODO [short links] set GroupShortLinkData
|
||||
sLnk <- shortenShortLink' =<< toShortGroupLink <$> withAgent (\a -> setContactShortLink a (aConnId conn) "" (Just crClientData))
|
||||
sLnk <- shortenShortLink' =<< toShortGroupLink <$> withAgent (\a -> setConnShortLink a (aConnId conn) SCMContact "" (Just crClientData))
|
||||
withFastStore' $ \db -> setUserContactLinkShortLink db uclId sLnk
|
||||
let groupLink' = CCLink connFullLink (Just sLnk)
|
||||
pure $ CRGroupLink user gInfo groupLink' mRole
|
||||
|
||||
Reference in New Issue
Block a user