Update PrepareUserMessage function to include replyToUid parameter
This commit is contained in:
parent
05df08efcb
commit
d709cb9454
@ -2,7 +2,7 @@ package helpers
|
|||||||
|
|
||||||
import "forge.redroom.link/yves/meowlib/client"
|
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]
|
peer := client.GetConfig().GetIdentity().Peers[peer_idx]
|
||||||
srv, err := client.GetConfig().GetIdentity().MessageServers.LoadServer(srvuid)
|
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
|
return nil, "PrepareServerMessage : AddFile", err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
usermessage.Status.AnswerToUuid = replyToUid
|
||||||
// Prepare cyphered + packed user message
|
// Prepare cyphered + packed user message
|
||||||
packedMsg, err := peer.ProcessOutboundUserMessage(usermessage)
|
packedMsg, err := peer.ProcessOutboundUserMessage(usermessage)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -159,7 +159,7 @@ message UserMessage {
|
|||||||
string from = 2; // My public key for that contact
|
string from = 2; // My public key for that contact
|
||||||
string type = 3;
|
string type = 3;
|
||||||
bytes data = 4;
|
bytes data = 4;
|
||||||
ConversationStatus Status = 5;
|
ConversationStatus status = 5;
|
||||||
ContactCard contact = 6;
|
ContactCard contact = 6;
|
||||||
ServerCard knownServers = 7;
|
ServerCard knownServers = 7;
|
||||||
Group group = 8;
|
Group group = 8;
|
||||||
|
Loading…
Reference in New Issue
Block a user