core: send group description to new members as welcome message after sending history (fixes welcome message being created before history) (#3623)

This commit is contained in:
spaced4ndy
2023-12-29 22:42:55 +04:00
committed by GitHub
parent 1438fd00e2
commit 478bb32cdb
4 changed files with 77 additions and 8 deletions
+5 -1
View File
@@ -56,7 +56,7 @@ import Simplex.Messaging.Version hiding (version)
-- This indirection is needed for backward/forward compatibility testing.
-- Testing with real app versions is still needed, as tests use the current code with different version ranges, not the old code.
currentChatVersion :: Version
currentChatVersion = 5
currentChatVersion = 6
-- This should not be used directly in code, instead use `chatVRange` from ChatConfig (see comment above)
supportedChatVRange :: VersionRange
@@ -82,6 +82,10 @@ groupForwardVRange = mkVersionRange 4 currentChatVersion
batchSendVRange :: VersionRange
batchSendVRange = mkVersionRange 5 currentChatVersion
-- version range that supports sending group welcome message in group history
groupHistoryIncludeWelcomeVRange :: VersionRange
groupHistoryIncludeWelcomeVRange = mkVersionRange 6 currentChatVersion
data ConnectionEntity
= RcvDirectMsgConnection {entityConnection :: Connection, contact :: Maybe Contact}
| RcvGroupMsgConnection {entityConnection :: Connection, groupInfo :: GroupInfo, groupMember :: GroupMember}