Refactor PrepareUserMessage function to store message after processing outbound user message, store is destructive for a usermessage
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
99a9aa14af
commit
2513f0303a
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user