store unknown servers in the invitation process answer and finalize + server storage fixes and testing
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
ycc
2024-06-05 14:45:01 +02:00
parent c0fd74f1e6
commit af55df1ff5
4 changed files with 172 additions and 4 deletions

View File

@ -135,6 +135,7 @@ func (id *Identity) AnswerInvitation(MyName string, ContactName string, MessageS
peer.InvitationMessage = ReceivedContact.InvitationMessage
for srv := range ReceivedContact.PullServers {
peer.ContactPullServers = append(peer.ContactPullServers, ReceivedContact.PullServers[srv].GetUid())
id.MessageServers.StoreServerIfNotExists(CreateServerFromUid(ReceivedContact.PullServers[srv].GetUid()))
}
/* for _, i := range MessageServerIdxs {
srv := id.MessageServers.Servers[i].GetServerCard()
@ -169,7 +170,9 @@ func (id *Identity) FinalizeInvitation(ReceivedContact *meowlib.ContactCard) err
}
}
return errors.New("no matching contact found for invitationId " + ReceivedContact.InvitationId)*/
for srv := range ReceivedContact.PullServers {
id.MessageServers.StoreServerIfNotExists(CreateServerFromUid(ReceivedContact.PullServers[srv].GetUid()))
}
return id.Peers.FinalizeInvitation(ReceivedContact)
}