Contact struct removed from peer
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@ -98,7 +98,14 @@ func (id *Identity) AnswerInvitation(MyName string, ContactName string, MessageS
|
||||
} else {
|
||||
peer.Name = ReceivedContact.Name
|
||||
}
|
||||
peer.Contact = *ReceivedContact
|
||||
peer.ContactEncryption = ReceivedContact.EncryptionPublicKey
|
||||
peer.ContactLookupKey = ReceivedContact.LookupPublicKey
|
||||
peer.ContactPublicKey = ReceivedContact.ContactPublicKey
|
||||
peer.InvitationId = ReceivedContact.InvitationId
|
||||
peer.InvitationMessage = ReceivedContact.InvitationMessage
|
||||
for srv := range ReceivedContact.PullServers {
|
||||
peer.ContactPullServers = append(peer.ContactPullServers, ReceivedContact.PullServers[srv].GetUid())
|
||||
}
|
||||
/* for _, i := range MessageServerIdxs {
|
||||
srv := id.MessageServers.Servers[i].GetServerCard()
|
||||
peer.MyContact.PullServers = append(peer.MyContact.PullServers, srv)
|
||||
@ -119,7 +126,14 @@ func (id *Identity) AnswerInvitation(MyName string, ContactName string, MessageS
|
||||
func (id *Identity) FinalizeInvitation(ReceivedContact *meowlib.ContactCard) error {
|
||||
for i, p := range id.Peers {
|
||||
if p.InvitationId == ReceivedContact.InvitationId {
|
||||
id.Peers[i].Contact = *ReceivedContact
|
||||
//id.Peers[i].Name = ReceivedContact.Name
|
||||
id.Peers[i].ContactEncryption = ReceivedContact.EncryptionPublicKey
|
||||
id.Peers[i].ContactLookupKey = ReceivedContact.LookupPublicKey
|
||||
id.Peers[i].ContactPublicKey = ReceivedContact.ContactPublicKey
|
||||
for srv := range ReceivedContact.PullServers {
|
||||
id.Peers[i].ContactPullServers = append(id.Peers[i].ContactPullServers, ReceivedContact.PullServers[srv].GetUid())
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
}
|
||||
@ -206,11 +220,11 @@ func (id *Identity) generateRandomHiddenStuff() {
|
||||
p.MyEncryptionKp = meowlib.NewKeyPair()
|
||||
p.MyIdentity = meowlib.NewKeyPair()
|
||||
p.MyLookupKp = meowlib.NewKeyPair()
|
||||
p.Contact.Name = randomLenString(4, 20)
|
||||
p.Contact.ContactPublicKey = p.MyLookupKp.Public
|
||||
p.Contact.EncryptionPublicKey = p.MyIdentity.Public
|
||||
p.Contact.LookupPublicKey = p.MyEncryptionKp.Public
|
||||
p.Contact.AddUrls([]string{randomLenString(14, 60), randomLenString(14, 60)})
|
||||
p.Name = randomLenString(4, 20)
|
||||
p.ContactPublicKey = p.MyLookupKp.Public
|
||||
p.ContactEncryption = p.MyIdentity.Public
|
||||
p.ContactLookupKey = p.MyEncryptionKp.Public
|
||||
// p.Contact.AddUrls([]string{randomLenString(14, 60), randomLenString(14, 60)}) // todo add servers
|
||||
id.Peers = append(id.Peers, p)
|
||||
id.HidePeer(0, randomLenString(8, 14))
|
||||
// TODO Add random conversations
|
||||
|
Reference in New Issue
Block a user