added an invitation message
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -43,7 +43,7 @@ func CreateIdentity(nickname string) *Identity {
|
||||
}
|
||||
|
||||
// Creates an invitation for a peer, returns the peer containing
|
||||
func (id *Identity) InvitePeer(MyName string, ContactName string, MessageServerIdxs []int) (*Peer, error) {
|
||||
func (id *Identity) InvitePeer(MyName string, ContactName string, MessageServerIdxs []int, InvitationMessage string) (*Peer, error) {
|
||||
var peer Peer
|
||||
peer.MyIdentity = meowlib.NewKeyPair()
|
||||
peer.MyEncryptionKp = meowlib.NewKeyPair()
|
||||
@ -67,6 +67,7 @@ func (id *Identity) InvitePeer(MyName string, ContactName string, MessageServerI
|
||||
peer.MyContact.EncryptionPublicKey = peer.MyEncryptionKp.Public
|
||||
peer.MyContact.LookupPublicKey = peer.MyLookupKp.Public
|
||||
peer.MyContact.InvitationId = peer.InvitationId
|
||||
peer.MyContact.InvitationMessage = InvitationMessage
|
||||
id.Peers = append(id.Peers, peer)
|
||||
|
||||
return &peer, nil
|
||||
|
Reference in New Issue
Block a user