diff --git a/client/identity.go b/client/identity.go index 6c9c6bc..24f49ed 100644 --- a/client/identity.go +++ b/client/identity.go @@ -82,7 +82,7 @@ func (id *Identity) CheckInvitation(ReceivedContact *meowlib.ContactCard) (isAns return false, "", ReceivedContact.Name } -func (id *Identity) AnswerInvitation(MyName string, ContactName string, MessageServerIdxs []int, ReceivedContact *meowlib.ContactCard) *meowlib.ContactCard { +func (id *Identity) AnswerInvitation(MyName string, ContactName string, MessageServerIdxs []int, ReceivedContact *meowlib.ContactCard) *Peer { var peer Peer var myContactCard meowlib.ContactCard peer.MyIdentity = meowlib.NewKeyPair() @@ -106,7 +106,7 @@ func (id *Identity) AnswerInvitation(MyName string, ContactName string, MessageS id.Peers = append(id.Peers, peer) - return &myContactCard + return &peer } func (id *Identity) FinalizeInvitation(ReceivedContact *meowlib.ContactCard) error { diff --git a/client/peer.go b/client/peer.go index f07c1d7..2c8b53b 100644 --- a/client/peer.go +++ b/client/peer.go @@ -106,7 +106,7 @@ func (p *Peer) BuildSingleFileMessage(filename string, message []byte) ([]meowli // Builds an invitation answer user message. // it takes as input a contactcard generated by Identity.AnswerInvitation -func (p *Peer) BuildInvitationAnswserMessage(myContactCard *meowlib.ContactCard) (*meowlib.UserMessage, error) { +func (p *Peer) BuildInvitationAnswerMessage(myContactCard *meowlib.ContactCard) (*meowlib.UserMessage, error) { var msg meowlib.UserMessage var invitation meowlib.Invitation invitation.Step = 3