This commit is contained in:
@ -115,30 +115,22 @@ func InvitationAnswerMessage(invitationId string, invitationServerUid string) ([
|
||||
return nil, "InvitationAnswerMessage: LoadServer", err
|
||||
}
|
||||
|
||||
// jsonsrv, err := json.Marshal(peer)
|
||||
// if err != nil {
|
||||
// return gobin2c(berrorToJson(err, "InvitationAnswerMessage: Marshal"))
|
||||
// }
|
||||
//fmt.Println(string(jsonsrv))
|
||||
// Prepare cyphered + packed user message
|
||||
// this will be the invitation's payload
|
||||
packedMsg, err := peer.ProcessOutboundUserMessage(answermsg)
|
||||
if err != nil {
|
||||
return nil, "InvitationAnswerMessage: ProcessOutboundUserMessage", err
|
||||
}
|
||||
// jsonsrv, err = json.Marshal(invitationServer)
|
||||
// if err != nil {
|
||||
// return gobin2c(berrorToJson(err, "InvitationAnswerMessage: Marshal"))
|
||||
// }
|
||||
//fmt.Println(string(jsonsrv))
|
||||
// Creating Server message for transporting the user message
|
||||
toServerMessage := invitationServer.BuildToServerMessageFromUserMessage(packedMsg)
|
||||
toServerMessage.Invitation = &meowlib.Invitation{Step: 3}
|
||||
toServerMessage.Invitation.From = peer.MyIdentity.Public
|
||||
pld, err := proto.Marshal(packedMsg)
|
||||
// move the payload to invitation
|
||||
toServerMessage.Messages = nil
|
||||
invitationPayload, err := proto.Marshal(packedMsg)
|
||||
if err != nil {
|
||||
return nil, "InvitationAnswerMessage: proto.Marshal", err
|
||||
}
|
||||
toServerMessage.Invitation.Payload = pld
|
||||
toServerMessage.Invitation.Payload = invitationPayload
|
||||
toServerMessage.Invitation = &meowlib.Invitation{Step: 3}
|
||||
toServerMessage.Invitation.From = peer.MyIdentity.Public
|
||||
bytemsg, err := invitationServer.ProcessOutboundMessage(toServerMessage)
|
||||
if err != nil {
|
||||
return nil, "InvitationAnswerMessage: ProcessOutboundMessage", err
|
||||
|
Reference in New Issue
Block a user