Track states on pairing process
This commit is contained in:
parent
d9b8817ecc
commit
deebcefc3d
@ -1237,6 +1237,14 @@ export default class Services {
|
|||||||
if (this.rolesContainsUs(state.roles)) {
|
if (this.rolesContainsUs(state.roles)) {
|
||||||
new_states.push(state.state_id);
|
new_states.push(state.state_id);
|
||||||
roles.push(state.roles);
|
roles.push(state.roles);
|
||||||
|
} else if (state.public_data && state.public_data['pairedAddresses']) {
|
||||||
|
// This is a pairing process
|
||||||
|
const pairedAddresses = this.decodeValue(state.public_data['pairedAddresses']);
|
||||||
|
// Are we part of it?
|
||||||
|
if (pairedAddresses.includes(this.getDeviceAddress())) {
|
||||||
|
// We save the process to db
|
||||||
|
await this.saveProcessToDb(processId, process as Process);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user