forked from cwtch.im/cwtch
Merge branch 'peerAdd' of dan/cwtch into master
This commit is contained in:
commit
87a0265142
|
@ -211,6 +211,9 @@ func (cp *cwtchPeer) GetGroupState(groupid string) connections.ConnectionState {
|
||||||
|
|
||||||
// PeerWithOnion is the entry point for cwtchPeer relationships
|
// PeerWithOnion is the entry point for cwtchPeer relationships
|
||||||
func (cp *cwtchPeer) PeerWithOnion(onion string) {
|
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}))
|
cp.eventBus.Publish(event.NewEvent(event.PeerRequest, map[event.Field]string{event.RemotePeer: onion}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue