Fix invitation answer message building with inv_id
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
caab80f346
commit
54c36c68ad
@ -119,7 +119,7 @@ func InvitationAnswerMessage(invitationId string, invitationServerUid string, ti
|
||||
return nil, "InvitationAnswerMessage: ProcessOutboundUserMessage", err
|
||||
}
|
||||
// Creating Server message for transporting the user message
|
||||
toServerMessage, err := invitationServer.BuildToServerMessageInvitationAnswer(packedMsg, peer.MyIdentity.Public, timeout)
|
||||
toServerMessage, err := invitationServer.BuildToServerMessageInvitationAnswer(packedMsg, peer.MyIdentity.Public, invitationId, timeout)
|
||||
if err != nil {
|
||||
return nil, "InvitationAnswerMessage: BuildToServerMessageInvitationAnswer", err
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ func (ints *Server) BuildMessageRequestMessage(lookupKeys []string) ([]byte, err
|
||||
|
||||
// BuildToServerMessageInvitation creates an invitation message to server and returns it as a meowlib.ToServerMessage
|
||||
// it takes as input a contactcard generated by Identity.InvitePeer
|
||||
func (ints *Server) BuildToServerMessageInvitationCreation(invitation *meowlib.ContactCard, password string, timeout int, invitationIdLen int) (*meowlib.ToServerMessage, error) {
|
||||
func (ints *Server) BuildToServerMessageInvitationCreation(invitation *meowlib.ContactCard, password string, timeout int, shortCodeLen int) (*meowlib.ToServerMessage, error) {
|
||||
var msg meowlib.ToServerMessage
|
||||
var inv meowlib.Invitation
|
||||
payload, err := invitation.Compress()
|
||||
@ -179,7 +179,7 @@ func (ints *Server) BuildToServerMessageInvitationCreation(invitation *meowlib.C
|
||||
inv.Step = 1
|
||||
inv.Password = password
|
||||
inv.Timeout = int32(timeout)
|
||||
inv.ShortcodeLen = int32(invitationIdLen)
|
||||
inv.ShortcodeLen = int32(shortCodeLen)
|
||||
inv.Payload = payload
|
||||
msg.Invitation = &inv
|
||||
return &msg, nil
|
||||
@ -200,7 +200,7 @@ func (ints *Server) BuildToServerMessageInvitationRequest(shortcode string, pass
|
||||
|
||||
// BuildToServerMessageInvitationAnswer creates an invitation answer to server and returns it as a meowlib.ToServerMessage
|
||||
// it takes as input a contactcard generated by Identity.InvitePeer
|
||||
func (ints *Server) BuildToServerMessageInvitationAnswer(invitationAnswer *meowlib.PackedUserMessage, myPublicKeyForThatPeer string, timeout int) (*meowlib.ToServerMessage, error) {
|
||||
func (ints *Server) BuildToServerMessageInvitationAnswer(invitationAnswer *meowlib.PackedUserMessage, myPublicKeyForThatPeer string, invitation_id string, timeout int) (*meowlib.ToServerMessage, error) {
|
||||
var msg meowlib.ToServerMessage
|
||||
var inv meowlib.Invitation
|
||||
invitationPayload, err := proto.Marshal(invitationAnswer)
|
||||
@ -208,6 +208,7 @@ func (ints *Server) BuildToServerMessageInvitationAnswer(invitationAnswer *meowl
|
||||
return nil, err
|
||||
}
|
||||
inv.Step = 3
|
||||
inv.Uuid = invitation_id
|
||||
msg.Type = "1"
|
||||
msg.From = ints.UserKp.Public
|
||||
inv.From = myPublicKeyForThatPeer
|
||||
|
Loading…
Reference in New Issue
Block a user