From 899541964515607e862b16a9d2466de0948fd5bc Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Mon, 27 Oct 2025 17:53:29 +0400 Subject: [PATCH] json --- src/Simplex/Chat/Protocol.hs | 2 +- src/Simplex/Chat/Types.hs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Simplex/Chat/Protocol.hs b/src/Simplex/Chat/Protocol.hs index cb7f645608..a523edbdc6 100644 --- a/src/Simplex/Chat/Protocol.hs +++ b/src/Simplex/Chat/Protocol.hs @@ -329,7 +329,7 @@ data ChatMsgEvent (e :: MsgEncoding) where XGrpLinkMem :: Profile -> ChatMsgEvent 'Json XGrpLinkAcpt :: GroupAcceptance -> GroupMemberRole -> MemberId -> ChatMsgEvent 'Json XGrpRelayInv :: ConnLinkContact -> ChatMsgEvent 'Json - XGrpRelayAcpt :: ConnLinkContact -> ChatMsgEvent 'Json -- TODO [chat relays] TBC short/long/any + XGrpRelayAcpt :: ConnLinkContact -> ChatMsgEvent 'Json XGrpMemNew :: MemberInfo -> Maybe MsgScope -> ChatMsgEvent 'Json XGrpMemIntro :: MemberInfo -> Maybe MemberRestrictions -> ChatMsgEvent 'Json XGrpMemInv :: MemberId -> IntroInvitation -> ChatMsgEvent 'Json diff --git a/src/Simplex/Chat/Types.hs b/src/Simplex/Chat/Types.hs index f48d50fa5b..9a8b252364 100644 --- a/src/Simplex/Chat/Types.hs +++ b/src/Simplex/Chat/Types.hs @@ -2016,6 +2016,10 @@ $(JQ.deriveJSON defaultJSON ''PendingContactConnection) $(JQ.deriveJSON defaultJSON ''GroupSupportChat) +$(JQ.deriveJSON (enumJSON $ dropPrefix "GRS") ''GroupRelayStatus) + +$(JQ.deriveJSON defaultJSON ''GroupRelay) + $(JQ.deriveJSON defaultJSON ''GroupMember) $(JQ.deriveJSON (enumJSON $ dropPrefix "MF") ''MsgFilter)