From c4b61e16c503e1cb5036831a75f2f717ed0714b1 Mon Sep 17 00:00:00 2001 From: ycc Date: Tue, 20 Feb 2024 22:44:19 +0100 Subject: [PATCH] Add invitation message to CheckInvitation function --- client/identity.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/identity.go b/client/identity.go index 258d2ad..fc0c63a 100644 --- a/client/identity.go +++ b/client/identity.go @@ -77,13 +77,13 @@ func (id *Identity) InvitePeer(MyName string, ContactName string, MessageServerU } // Checks if the received contact card is an answer to an invitation, returns true if it is, and the proposed and received nicknames -func (id *Identity) CheckInvitation(ReceivedContact *meowlib.ContactCard) (isAnswer bool, proposedNick string, receivedNick string) { +func (id *Identity) CheckInvitation(ReceivedContact *meowlib.ContactCard) (isAnswer bool, proposedNick string, receivedNick string, invitationMessage string) { for _, p := range id.Peers { if p.InvitationId == ReceivedContact.InvitationId { - return true, p.Name, ReceivedContact.Name + return true, p.Name, ReceivedContact.Name, ReceivedContact.InvitationMessage } } - return false, "", ReceivedContact.Name + return false, "", ReceivedContact.Name, ReceivedContact.InvitationMessage } // Answers an invitation, returns the newly created peer including infos to provide a ContactCard