Skip to content

Commit 99f9de7

Browse files
committed
Merge branch 'master' into rcv-services
2 parents fe30d69 + 97802a3 commit 99f9de7

4 files changed

Lines changed: 19 additions & 6 deletions

File tree

apps/common/Web/static/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@
105105
class="text-[16px] leading-[26px] tracking-[0.01em] nav-link-text text-black dark:text-white before:bg-black dark:before:bg-white">Server
106106
information</span></a>
107107
</li>
108-
<x-xftpConfig>
108+
<!-- <x-xftpConfig>
109109
<li class="nav-link relative"><a href="/file"
110110
class="flex items-center justify-between gap-2 lg:py-5 whitespace-nowrap"><span
111111
class="text-[16px] leading-[26px] tracking-[0.01em] nav-link-text text-black dark:text-white before:bg-black dark:before:bg-white">File
112112
transfer</span></a>
113113
</li>
114-
</x-xftpConfig>
114+
</x-xftpConfig> -->
115115
</ul><a target="_blank" href="https://github.com/simplex-chat/simplex-chat#help-us-with-donations"
116116
class="whitespace-nowrap flex items-center gap-1 self-center text-white dark:text-black text-[16px] font-medium tracking-[0.02em] rounded-[34px] bg-primary-light dark:bg-primary-dark py-3 lg:py-2 px-20 lg:px-5 mb-16 lg:mb-0">Donate</a>
117117
</div>

apps/xftp-server/XFTPWeb.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ xftpWebContent = $(embedDir "apps/xftp-server/static/xftp-web-bundle/")
3131
xftpMediaContent :: [(FilePath, ByteString)]
3232
xftpMediaContent = $(embedDir "apps/xftp-server/static/media/")
3333

34-
xftpFilePageHtml :: ByteString
35-
xftpFilePageHtml = $(embedFile "apps/xftp-server/static/file.html")
34+
-- xftpFilePageHtml :: ByteString
35+
-- xftpFilePageHtml = $(embedFile "apps/xftp-server/static/file.html")
3636

3737
xftpGenerateSite :: XFTPServerConfig -> Maybe ServerPublicInfo -> Maybe TransportHost -> FilePath -> IO ()
3838
xftpGenerateSite cfg info onionHost path = do
@@ -44,7 +44,7 @@ xftpGenerateSite cfg info onionHost path = do
4444
filePage xftpDir xftpWebContent
4545
filePage mediaDir xftpMediaContent
4646
createDirectoryIfMissing True fileDir
47-
B.writeFile (fileDir </> "index.html") $ render xftpFilePageHtml substs
47+
-- B.writeFile (fileDir </> "index.html") $ render xftpFilePageHtml substs
4848
where
4949
filePage dir content_ = do
5050
createDirectoryIfMissing True dir

simplexmq.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cabal-version: 1.12
22

33
name: simplexmq
4-
version: 6.5.0.12
4+
version: 6.5.0.14
55
synopsis: SimpleXMQ message broker
66
description: This package includes <./docs/Simplex-Messaging-Server.html server>,
77
<./docs/Simplex-Messaging-Client.html client> and

src/Simplex/Messaging/Agent.hs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ module Simplex.Messaging.Agent
6565
setConnShortLink,
6666
deleteConnShortLink,
6767
getConnShortLink,
68+
getConnLinkPrivKey,
6869
deleteLocalInvShortLink,
6970
changeConnectionUser,
7071
prepareConnectionToJoin,
@@ -439,6 +440,10 @@ getConnShortLink :: AgentClient -> NetworkRequestMode -> UserId -> ConnShortLink
439440
getConnShortLink c = withAgentEnv c .:. getConnShortLink' c
440441
{-# INLINE getConnShortLink #-}
441442

443+
getConnLinkPrivKey :: AgentClient -> ConnId -> AE (Maybe C.PrivateKeyEd25519)
444+
getConnLinkPrivKey c = withAgentEnv c . getConnLinkPrivKey' c
445+
{-# INLINE getConnLinkPrivKey #-}
446+
442447
-- | This irreversibly deletes short link data, and it won't be retrievable again
443448
deleteLocalInvShortLink :: AgentClient -> ConnShortLink 'CMInvitation -> AE ()
444449
deleteLocalInvShortLink c = withAgentEnv c . deleteLocalInvShortLink' c
@@ -1127,6 +1132,14 @@ deleteConnShortLink' c nm connId cMode =
11271132
(RcvConnection _ rq, SCMInvitation) -> deleteQueueLink c nm rq
11281133
_ -> throwE $ CMD PROHIBITED "deleteConnShortLink: not contact address"
11291134

1135+
getConnLinkPrivKey' :: AgentClient -> ConnId -> AM (Maybe C.PrivateKeyEd25519)
1136+
getConnLinkPrivKey' c connId = do
1137+
SomeConn _ conn <- withStore c (`getConn` connId)
1138+
pure $ case conn of
1139+
ContactConnection _ rq -> linkPrivSigKey <$> shortLink rq
1140+
RcvConnection _ rq -> linkPrivSigKey <$> shortLink rq
1141+
_ -> Nothing
1142+
11301143
-- TODO [short links] remove 1-time invitation data and link ID from the server after the message is sent.
11311144
getConnShortLink' :: forall c. AgentClient -> NetworkRequestMode -> UserId -> ConnShortLink c -> AM (FixedLinkData c, ConnLinkData c)
11321145
getConnShortLink' c nm userId = \case

0 commit comments

Comments
 (0)