diff --git a/peer/cwtch_peer.go b/peer/cwtch_peer.go index e56ae81..6bb5980 100644 --- a/peer/cwtch_peer.go +++ b/peer/cwtch_peer.go @@ -187,7 +187,9 @@ func (cp *cwtchPeer) AddContact(nick, onion string, publickey []byte, trusted bo pp := &model.PublicProfile{Name: nick, Ed25519PublicKey: publickey, Trusted: trusted, Blocked: false, Onion: onion, Attributes: map[string]string{"name": nick}} cp.GetProfile().Contacts[onion] = pp cp.Profile.AddContact(onion, pp) + pd, _ := json.Marshal(pp) cp.eventBus.Publish(event.NewEvent(event.PeerCreated, map[event.Field]string{ + event.Data: string(pd), event.RemotePeer: onion, })) }