fix permissionhandler

pull/3094/head
yann300 6 years ago
parent 90bcdf54ab
commit 5e2f165ade
  1. 10
      src/persmission-handler.js

@ -68,7 +68,10 @@ export class PermissionHandler {
label: 'Accept',
fn: () => {
if (this.permissions[to.name][from.name]) {
this.permissions[to.name][from.name].allow = true
this.permissions[to.name][from.name] = {
allow: true,
hash: from.hash
}
this.persistPermissions()
}
resolve()
@ -78,7 +81,10 @@ export class PermissionHandler {
label: 'Decline',
fn: () => {
if (this.permissions[to.name][from.name]) {
this.permissions[to.name][from.name].allow = false
this.permissions[to.name][from.name] = {
allow: false,
hash: from.hash
}
this.persistPermissions()
}
reject(notAllowWarning(from, to))

Loading…
Cancel
Save