From 69a07d77d59dbed6a024321e2a556ed82af58ab1 Mon Sep 17 00:00:00 2001 From: ycc Date: Sat, 10 Feb 2024 23:35:41 +0100 Subject: [PATCH] Fix error handling in GetMyContact and GetContact functions --- client/peer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/peer.go b/client/peer.go index 07d5794..d6615ff 100644 --- a/client/peer.go +++ b/client/peer.go @@ -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