Merge branch 'bug_pairing_not_my_processes' into dev

This commit is contained in:
Sosthene 2025-08-08 08:28:24 +02:00
commit 0dd928d28b

View File

@ -1509,15 +1509,22 @@ export default class Services {
public async getMyProcesses(): Promise<string[] | null> {
// If we're not paired yet, just skip it
let pairingProcessId = null;
try {
this.getPairingProcessId();
pairingProcessId = this.getPairingProcessId();
} catch (e) {
return null;
}
if (!pairingProcessId) {
return null;
}
try {
const processes = await this.getProcesses();
const newMyProcesses = new Set<string>(this.myProcesses || []);
// MyProcesses automatically contains pairing process
newMyProcesses.add(pairingProcessId);
for (const [processId, process] of Object.entries(processes)) {
// We use myProcesses attribute to not reevaluate all processes everytime
if (newMyProcesses.has(processId)) {