Skip to content

Commit 6ac7101

Browse files
authored
agent: make decoding for short link data forward compatible (#1568)
1 parent f44ea0a commit 6ac7101

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Simplex/Messaging/Agent/Protocol.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,13 +1684,13 @@ instance Encoding AConnLinkData where
16841684
smpP =
16851685
smpP >>= \case
16861686
CMInvitation -> do
1687-
(vr, userData) <- smpP
1687+
(vr, userData) <- smpP <* A.takeByteString -- ignoring tail for forward compatibility with the future link data encoding
16881688
pure $ ACLD SCMInvitation $ InvitationLinkData vr userData
16891689
CMContact -> do
16901690
(agentVRange, direct) <- smpP
16911691
owners <- smpListP
16921692
relays <- smpListP
1693-
userData <- smpP
1693+
userData <- smpP <* A.takeByteString -- ignoring tail for forward compatibility with the future link data encoding
16941694
pure $ ACLD SCMContact ContactLinkData {agentVRange, direct, owners, relays, userData}
16951695

16961696
-- | SMP queue status.

0 commit comments

Comments
 (0)