From cbedad717811c69177bc4205a17a3f887bf2d5d6 Mon Sep 17 00:00:00 2001 From: ycc Date: Wed, 3 Jan 2024 19:40:38 +0100 Subject: [PATCH] typo, + invitation return value changed from ContactCard to Peer --- client/identity.go | 4 ++-- client/peer.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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