From 68f359c90475205ffeb506532a0cb3ecf564ace8 Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Wed, 6 Sep 2023 10:15:32 +0400 Subject: [PATCH] core: enable creation of direct connections in group for chat protocol v2 (for beta; to be reverted for full release) (#3022) --- src/Simplex/Chat/Protocol.hs | 2 +- tests/ChatTests/Groups.hs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Simplex/Chat/Protocol.hs b/src/Simplex/Chat/Protocol.hs index 2f93ab13d..d104e002f 100644 --- a/src/Simplex/Chat/Protocol.hs +++ b/src/Simplex/Chat/Protocol.hs @@ -56,7 +56,7 @@ supportedChatVRange = mkVersionRange 1 currentChatVersion -- version that starts support for skipping establishing direct connections in a group groupNoDirectVersion :: Version -groupNoDirectVersion = 2 +groupNoDirectVersion = 3 -- 2 data ConnectionEntity = RcvDirectMsgConnection {entityConnection :: Connection, contact :: Maybe Contact} diff --git a/tests/ChatTests/Groups.hs b/tests/ChatTests/Groups.hs index e533a55da..82481e9df 100644 --- a/tests/ChatTests/Groups.hs +++ b/tests/ChatTests/Groups.hs @@ -68,16 +68,16 @@ chatGroupTests = do it "should send delivery receipts in group depending on configuration" testConfigureGroupDeliveryReceipts describe "direct connections in group are not established based on chat protocol version" $ do describe "3 members group" $ do - testNoDirect _0 _0 True + testNoDirect _0 _0 False -- True testNoDirect _0 _1 False testNoDirect _1 _0 False testNoDirect _1 _1 False describe "4 members group" $ do - testNoDirect4 _0 _0 _0 True True True - testNoDirect4 _0 _0 _1 True False False - testNoDirect4 _0 _1 _0 False True False + testNoDirect4 _0 _0 _0 False False False -- True True True + testNoDirect4 _0 _0 _1 False False False -- True False False + testNoDirect4 _0 _1 _0 False False False -- False True False testNoDirect4 _0 _1 _1 False False False - testNoDirect4 _1 _0 _0 False False True + testNoDirect4 _1 _0 _0 False False False -- False False True testNoDirect4 _1 _0 _1 False False False testNoDirect4 _1 _1 _0 False False False testNoDirect4 _1 _1 _1 False False False