diff --git a/apps/common/Web/static/index.html b/apps/common/Web/static/index.html index 10caed33a..a5b42313a 100644 --- a/apps/common/Web/static/index.html +++ b/apps/common/Web/static/index.html @@ -105,13 +105,13 @@ class="text-[16px] leading-[26px] tracking-[0.01em] nav-link-text text-black dark:text-white before:bg-black dark:before:bg-white">Server information - + Donate diff --git a/apps/xftp-server/XFTPWeb.hs b/apps/xftp-server/XFTPWeb.hs index a3edb41f0..d0b450ece 100644 --- a/apps/xftp-server/XFTPWeb.hs +++ b/apps/xftp-server/XFTPWeb.hs @@ -31,8 +31,8 @@ xftpWebContent = $(embedDir "apps/xftp-server/static/xftp-web-bundle/") xftpMediaContent :: [(FilePath, ByteString)] xftpMediaContent = $(embedDir "apps/xftp-server/static/media/") -xftpFilePageHtml :: ByteString -xftpFilePageHtml = $(embedFile "apps/xftp-server/static/file.html") +-- xftpFilePageHtml :: ByteString +-- xftpFilePageHtml = $(embedFile "apps/xftp-server/static/file.html") xftpGenerateSite :: XFTPServerConfig -> Maybe ServerPublicInfo -> Maybe TransportHost -> FilePath -> IO () xftpGenerateSite cfg info onionHost path = do @@ -44,7 +44,7 @@ xftpGenerateSite cfg info onionHost path = do filePage xftpDir xftpWebContent filePage mediaDir xftpMediaContent createDirectoryIfMissing True fileDir - B.writeFile (fileDir "index.html") $ render xftpFilePageHtml substs + -- B.writeFile (fileDir "index.html") $ render xftpFilePageHtml substs where filePage dir content_ = do createDirectoryIfMissing True dir diff --git a/simplexmq.cabal b/simplexmq.cabal index 5aa177491..39737b5f6 100644 --- a/simplexmq.cabal +++ b/simplexmq.cabal @@ -1,7 +1,7 @@ cabal-version: 1.12 name: simplexmq -version: 6.5.0.12 +version: 6.5.0.14 synopsis: SimpleXMQ message broker description: This package includes <./docs/Simplex-Messaging-Server.html server>, <./docs/Simplex-Messaging-Client.html client> and diff --git a/src/Simplex/Messaging/Agent.hs b/src/Simplex/Messaging/Agent.hs index ac9497f87..c68318c84 100644 --- a/src/Simplex/Messaging/Agent.hs +++ b/src/Simplex/Messaging/Agent.hs @@ -65,6 +65,7 @@ module Simplex.Messaging.Agent setConnShortLink, deleteConnShortLink, getConnShortLink, + getConnLinkPrivKey, deleteLocalInvShortLink, changeConnectionUser, prepareConnectionToJoin, @@ -439,6 +440,10 @@ getConnShortLink :: AgentClient -> NetworkRequestMode -> UserId -> ConnShortLink getConnShortLink c = withAgentEnv c .:. getConnShortLink' c {-# INLINE getConnShortLink #-} +getConnLinkPrivKey :: AgentClient -> ConnId -> AE (Maybe C.PrivateKeyEd25519) +getConnLinkPrivKey c = withAgentEnv c . getConnLinkPrivKey' c +{-# INLINE getConnLinkPrivKey #-} + -- | This irreversibly deletes short link data, and it won't be retrievable again deleteLocalInvShortLink :: AgentClient -> ConnShortLink 'CMInvitation -> AE () deleteLocalInvShortLink c = withAgentEnv c . deleteLocalInvShortLink' c @@ -1127,6 +1132,14 @@ deleteConnShortLink' c nm connId cMode = (RcvConnection _ rq, SCMInvitation) -> deleteQueueLink c nm rq _ -> throwE $ CMD PROHIBITED "deleteConnShortLink: not contact address" +getConnLinkPrivKey' :: AgentClient -> ConnId -> AM (Maybe C.PrivateKeyEd25519) +getConnLinkPrivKey' c connId = do + SomeConn _ conn <- withStore c (`getConn` connId) + pure $ case conn of + ContactConnection _ rq -> linkPrivSigKey <$> shortLink rq + RcvConnection _ rq -> linkPrivSigKey <$> shortLink rq + _ -> Nothing + -- TODO [short links] remove 1-time invitation data and link ID from the server after the message is sent. getConnShortLink' :: forall c. AgentClient -> NetworkRequestMode -> UserId -> ConnShortLink c -> AM (FixedLinkData c, ConnLinkData c) getConnShortLink' c nm userId = \case