Merge pull request 'update ui on block' (#22) from erinn237 into trunk
continuous-integration/drone/push Build is passing Details

Reviewed-on: #22
This commit is contained in:
Sarah Jamie Lewis 2021-04-12 15:44:37 -07:00
commit bd7bccb9d2
1 changed files with 7 additions and 8 deletions

3
lib.go
View File

@ -346,7 +346,6 @@ func AcceptContact(profile, handle string) {
err := application.GetPeer(profile).SetContactAuthorization(handle, model.AuthApproved)
if err == nil {
eventHandler.Push(event.NewEvent(event.PeerStateChange, map[event.Field]string{
//application.GetPrimaryBus().Publish(event.NewEvent(event.PeerStateChange, map[event.Field]string{
"ProfileOnion": profile,
event.RemotePeer: handle,
"authorization": string(model.AuthApproved),
@ -364,7 +363,7 @@ func c_BlockContact(profilePtr *C.char, profileLen C.int, handlePtr *C.char, han
func BlockContact(profile, handle string) {
err := application.GetPeer(profile).SetContactAuthorization(handle, model.AuthBlocked)
if err == nil {
application.GetPrimaryBus().Publish(event.NewEvent(event.PeerStateChange, map[event.Field]string{
eventHandler.Push(event.NewEvent(event.PeerStateChange, map[event.Field]string{
"ProfileOnion": profile,
event.RemotePeer: handle,
"authorization": string(model.AuthBlocked),