From 514d25c3655693faba90a68071aaa87afd88a48e Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Tue, 5 Nov 2019 14:15:56 -0800 Subject: [PATCH] tie peerWithOnion to AddContact --- peer/cwtch_peer.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/peer/cwtch_peer.go b/peer/cwtch_peer.go index 7a70eeb..aa4b457 100644 --- a/peer/cwtch_peer.go +++ b/peer/cwtch_peer.go @@ -211,6 +211,9 @@ func (cp *cwtchPeer) GetGroupState(groupid string) connections.ConnectionState { // PeerWithOnion is the entry point for cwtchPeer relationships func (cp *cwtchPeer) PeerWithOnion(onion string) { + if _, exists := cp.Profile.GetContact(onion); !exists { + cp.AddContact(onion, onion, false) + } cp.eventBus.Publish(event.NewEvent(event.PeerRequest, map[event.Field]string{event.RemotePeer: onion})) }