add uid to peer + helper methods + http
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
ycc
2024-03-23 20:09:14 +01:00
parent 0a70206b11
commit f80411bf21
11 changed files with 715 additions and 1 deletions

View File

@ -47,6 +47,7 @@ func CreateIdentity(nickname string) *Identity {
// Creates an invitation for a peer, returns the newly created peer including infos to provide a ContactCard
func (id *Identity) InvitePeer(MyName string, ContactName string, MessageServerUids []string, InvitationMessage string) (*Peer, error) {
var peer Peer
peer.Uid = uuid.New().String()
peer.MyIdentity = meowlib.NewKeyPair()
peer.MyEncryptionKp = meowlib.NewKeyPair()
peer.MyLookupKp = meowlib.NewKeyPair()
@ -93,6 +94,7 @@ func (id *Identity) CheckInvitation(ReceivedContact *meowlib.ContactCard) (isAns
func (id *Identity) AnswerInvitation(MyName string, ContactName string, MessageServerIdxs []string, ReceivedContact *meowlib.ContactCard) *Peer {
var peer Peer
//var myContactCard meowlib.ContactCard
peer.Uid = uuid.New().String()
peer.MyIdentity = meowlib.NewKeyPair()
peer.MyEncryptionKp = meowlib.NewKeyPair()
peer.MyLookupKp = meowlib.NewKeyPair()