From d709cb9454ce8e4644f4a82da3089a67189049cc Mon Sep 17 00:00:00 2001 From: ycc Date: Tue, 9 Apr 2024 20:58:29 +0200 Subject: [PATCH] Update PrepareUserMessage function to include replyToUid parameter --- client/helpers/messageHelper.go | 3 ++- pb/messages.proto | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/helpers/messageHelper.go b/client/helpers/messageHelper.go index 2b2b58b..105b91d 100644 --- a/client/helpers/messageHelper.go +++ b/client/helpers/messageHelper.go @@ -2,7 +2,7 @@ package helpers import "forge.redroom.link/yves/meowlib/client" -func PrepareUserMessage(message string, srvuid string, peer_idx int, filelist []string) ([]byte, string, error) { +func PrepareUserMessage(message string, srvuid string, peer_idx int, replyToUid string, filelist []string) ([]byte, string, error) { peer := client.GetConfig().GetIdentity().Peers[peer_idx] srv, err := client.GetConfig().GetIdentity().MessageServers.LoadServer(srvuid) @@ -20,6 +20,7 @@ func PrepareUserMessage(message string, srvuid string, peer_idx int, filelist [] return nil, "PrepareServerMessage : AddFile", err } } + usermessage.Status.AnswerToUuid = replyToUid // Prepare cyphered + packed user message packedMsg, err := peer.ProcessOutboundUserMessage(usermessage) if err != nil { diff --git a/pb/messages.proto b/pb/messages.proto index cc87113..3ce7e2a 100644 --- a/pb/messages.proto +++ b/pb/messages.proto @@ -159,7 +159,7 @@ message UserMessage { string from = 2; // My public key for that contact string type = 3; bytes data = 4; - ConversationStatus Status = 5; + ConversationStatus status = 5; ContactCard contact = 6; ServerCard knownServers = 7; Group group = 8;