Fix error handling in GetMyContact and GetContact functions
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
ycc 2024-02-10 23:35:41 +01:00
parent a19f228c8e
commit 69a07d77d5

View File

@ -59,7 +59,7 @@ func (p *Peer) GetMyContact() *meowlib.ContactCard {
c.LookupPublicKey = p.MyLookupKp.Public
c.EncryptionPublicKey = p.MyEncryptionKp.Public
srvCards, err := GetConfig().GetIdentity().MessageServers.LoadServerCardsFromUids(p.MyPullServers)
if err != nil {
if err == nil {
c.PullServers = srvCards
}
c.InvitationId = p.InvitationId
@ -74,7 +74,7 @@ func (p *Peer) GetContact() *meowlib.ContactCard {
c.LookupPublicKey = p.ContactLookupKey
c.EncryptionPublicKey = p.ContactEncryption
srvCards, err := GetConfig().GetIdentity().MessageServers.LoadServerCardsFromUids(p.ContactPullServers)
if err != nil {
if err == nil {
c.PullServers = srvCards
}
c.InvitationId = p.InvitationId