Merge branch 'addcontactbugfix' of cwtch.im/cwtch into master
This commit is contained in:
commit
b845673d10
|
@ -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}}
|
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.GetProfile().Contacts[onion] = pp
|
||||||
cp.Profile.AddContact(onion, pp)
|
cp.Profile.AddContact(onion, pp)
|
||||||
|
pd, _ := json.Marshal(pp)
|
||||||
cp.eventBus.Publish(event.NewEvent(event.PeerCreated, map[event.Field]string{
|
cp.eventBus.Publish(event.NewEvent(event.PeerCreated, map[event.Field]string{
|
||||||
|
event.Data: string(pd),
|
||||||
event.RemotePeer: onion,
|
event.RemotePeer: onion,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue