diff --git a/cabal.project b/cabal.project index b0bb9f2d7..f6ee24247 100644 --- a/cabal.project +++ b/cabal.project @@ -5,7 +5,7 @@ constraints: zip +disable-bzip2 +disable-zstd source-repository-package type: git location: https://github.com/simplex-chat/simplexmq.git - tag: 4c0164c49effe8d1b3fd98aca184245a8b4cac93 + tag: abd694bd5af57b596f48214fe3c0d0e8982fc793 source-repository-package type: git diff --git a/scripts/nix/sha256map.nix b/scripts/nix/sha256map.nix index 6ecd9cde9..6fb28658c 100644 --- a/scripts/nix/sha256map.nix +++ b/scripts/nix/sha256map.nix @@ -1,5 +1,5 @@ { - "https://github.com/simplex-chat/simplexmq.git"."4c0164c49effe8d1b3fd98aca184245a8b4cac93" = "1ni3phxal10rfrkgnhcih3ksh7nfnj5b7vkk0qs9k52hmc8g306b"; + "https://github.com/simplex-chat/simplexmq.git"."abd694bd5af57b596f48214fe3c0d0e8982fc793" = "0j8m4hcms8ffkbpspds8crvcs1gslgrk4xqp6xvgb0hhv499541n"; "https://github.com/simplex-chat/aeson.git"."3eb66f9a68f103b5f1489382aad89f5712a64db7" = "0kilkx59fl6c3qy3kjczqvm8c3f4n3p0bdk9biyflf51ljnzp4yp"; "https://github.com/simplex-chat/haskell-terminal.git"."f708b00009b54890172068f168bf98508ffcd495" = "0zmq7lmfsk8m340g47g5963yba7i88n4afa6z93sg9px5jv1mijj"; "https://github.com/zw3rk/android-support.git"."3c3a5ab0b8b137a072c98d3d0937cbdc96918ddb" = "1r6jyxbim3dsvrmakqfyxbd6ms6miaghpbwyl0sr6dzwpgaprz97"; diff --git a/src/Simplex/Chat.hs b/src/Simplex/Chat.hs index 3fb05ddb6..7a9f901c8 100644 --- a/src/Simplex/Chat.hs +++ b/src/Simplex/Chat.hs @@ -5,6 +5,7 @@ {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} @@ -60,9 +61,8 @@ import Simplex.Messaging.Agent.Protocol import qualified Simplex.Messaging.Crypto as C import Simplex.Messaging.Encoding import Simplex.Messaging.Encoding.String -import Simplex.Messaging.Notifications.Types (NtfServer) import Simplex.Messaging.Parsers (base64P, parseAll) -import Simplex.Messaging.Protocol (ErrorType (..), MsgBody, MsgFlags (..)) +import Simplex.Messaging.Protocol (ErrorType (..), MsgBody, MsgFlags (..), NtfServer) import qualified Simplex.Messaging.Protocol as SMP import qualified Simplex.Messaging.TMap as TM import Simplex.Messaging.Util (ifM, liftEitherError, tryError, unlessM, whenM, (<$?>)) @@ -104,7 +104,7 @@ _defaultSMPServers = ] _defaultNtfServers :: [NtfServer] -_defaultNtfServers = ["smp://FB-Uop7RTaZZEG0ZLD2CIaTjsPh-Fw0zFAnb7QyA8Ks=@ntf2.simplex.im"] +_defaultNtfServers = ["ntf://FB-Uop7RTaZZEG0ZLD2CIaTjsPh-Fw0zFAnb7QyA8Ks=@ntf2.simplex.im"] maxImageSize :: Integer maxImageSize = 236700 @@ -1126,7 +1126,7 @@ processAgentMessage (Just User {userId}) "" agentMessage = case agentMessage of SUSPENDED -> toView CRChatSuspended _ -> pure () where - serverEvent srv@SMP.ProtocolServer {host, port} conns event str = do + serverEvent srv@(SMPServer host port _) conns event str = do cs <- withStore' $ \db -> getConnectionsContacts db userId conns toView $ event srv cs showToast ("server " <> str) (safeDecodeUtf8 . strEncode $ SrvLoc host port) diff --git a/stack.yaml b/stack.yaml index 9d6e1ba0c..dbc8d7c17 100644 --- a/stack.yaml +++ b/stack.yaml @@ -49,7 +49,7 @@ extra-deps: # - simplexmq-1.0.0@sha256:34b2004728ae396e3ae449cd090ba7410781e2b3cefc59259915f4ca5daa9ea8,8561 # - ../simplexmq - github: simplex-chat/simplexmq - commit: 4c0164c49effe8d1b3fd98aca184245a8b4cac93 + commit: abd694bd5af57b596f48214fe3c0d0e8982fc793 # - terminal-0.2.0.0@sha256:de6770ecaae3197c66ac1f0db5a80cf5a5b1d3b64a66a05b50f442de5ad39570,2977 - github: simplex-chat/aeson commit: 3eb66f9a68f103b5f1489382aad89f5712a64db7 diff --git a/tests/ChatClient.hs b/tests/ChatClient.hs index 4eb48b1b0..b45adf8cf 100644 --- a/tests/ChatClient.hs +++ b/tests/ChatClient.hs @@ -274,6 +274,7 @@ serverCfg = certificateFile = "tests/fixtures/tls/server.crt", logStatsInterval = Just 86400, logStatsStartTime = 0, + serverStatsFile = Nothing, smpServerVRange = supportedSMPServerVRange } diff --git a/tests/ProtocolTests.hs b/tests/ProtocolTests.hs index 1be897fec..e7ffcc2d0 100644 --- a/tests/ProtocolTests.hs +++ b/tests/ProtocolTests.hs @@ -15,7 +15,7 @@ import qualified Simplex.Messaging.Crypto as C import Simplex.Messaging.Crypto.Ratchet import Simplex.Messaging.Encoding.String import Simplex.Messaging.Parsers (parseAll) -import Simplex.Messaging.Protocol (ProtocolServer (..), smpClientVRange) +import Simplex.Messaging.Protocol (smpClientVRange) import Simplex.Messaging.Version import Test.Hspec @@ -23,12 +23,7 @@ protocolTests :: Spec protocolTests = decodeChatMessageTest srv :: SMPServer -srv = - ProtocolServer - { host = "smp.simplex.im", - port = "5223", - keyHash = C.KeyHash "\215m\248\251" - } +srv = SMPServer "smp.simplex.im" "5223" (C.KeyHash "\215m\248\251") queue :: SMPQueueUri queue =