core: fix version update on binary chunks (#7320)

* core: fix version update on binary chunks

* pass chat event

* pass encoding

* revert

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
This commit is contained in:
Evgeny
2026-07-28 17:51:01 +01:00
committed by GitHub
co-authored by Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
parent 8dc387cb56
commit 64bf358040
+3 -1
View File
@@ -2674,7 +2674,9 @@ sendPendingGroupMessages user gInfo GroupMember {groupMemberId} conn = do
saveDirectRcvMSG :: forall e. MsgEncodingI e => Connection -> MsgMeta -> ChatMessage e -> CM (Connection, RcvMessage)
saveDirectRcvMSG conn@Connection {connId} agentMsgMeta chatMsg@ChatMessage {chatVRange, msgId = sharedMsgId_, chatMsgEvent} = do
conn' <- updatePeerChatVRange conn chatVRange
conn' <- case encoding @e of
SJson -> updatePeerChatVRange conn chatVRange
SBinary -> pure conn
let agentMsgId = fst $ recipient agentMsgMeta
brokerTs = metaBrokerTs agentMsgMeta
newMsg = NewRcvMessage {chatMsgEvent, verifiedMsg = VMUnsigned chatMsg, brokerTs}