diff --git a/client/peer.go b/client/peer.go index 20540b6..c435a92 100644 --- a/client/peer.go +++ b/client/peer.go @@ -50,6 +50,15 @@ func (pl *PeerList) GetFromPublicKey(publickey string) *Peer { return nil } +func (pl *PeerList) GetFromMyLookupKey(publickey string) *Peer { + for _, peer := range *pl { + if peer.MyLookupKp.Public == publickey { + return &peer + } + } + return nil +} + func (pl *PeerList) GetFromName(name string) *Peer { for _, peer := range *pl { if peer.Contact.Name == name {