diff --git a/client/helpers/messageHelper.go b/client/helpers/messageHelper.go index f2c3595..2b2b58b 100644 --- a/client/helpers/messageHelper.go +++ b/client/helpers/messageHelper.go @@ -20,8 +20,6 @@ func PrepareUserMessage(message string, srvuid string, peer_idx int, filelist [] return nil, "PrepareServerMessage : AddFile", err } } - // Store message - peer.StoreMessage(usermessage, filelist) // Prepare cyphered + packed user message packedMsg, err := peer.ProcessOutboundUserMessage(usermessage) if err != nil { @@ -33,5 +31,10 @@ func PrepareUserMessage(message string, srvuid string, peer_idx int, filelist [] if err != nil { return nil, "PrepareServerMessage : ProcessOutboundMessage", err } + // Store message + err = peer.StoreMessage(usermessage, filelist) + if err != nil { + return nil, "PrepareServerMessage : StoreMessage", err + } return data, "", nil }