Exclude pairing process from the chat list

This commit is contained in:
NicolasCantu 2025-03-03 21:26:58 +01:00
parent 7ebc5a75ea
commit c32a7f9e86
2 changed files with 16 additions and 0 deletions

View File

@ -1138,6 +1138,11 @@ class ChatElement extends HTMLElement {
continue; continue;
} }
// If process is a pairing process, we don't want it in the list
if (service.isPairingProcess(roles)) {
continue;
}
const processName = service.getProcessName(process); const processName = service.getProcessName(process);
const emoji = await addressToEmoji(processId); const emoji = await addressToEmoji(processId);

View File

@ -1273,4 +1273,15 @@ export default class Services {
return null; return null;
} }
} }
public isPairingProcess(roles: Record<string, RoleDefinition>): boolean {
if (Object.keys(roles).length != 1) { return false }
const pairingRole = roles['pairing'];
if (pairingRole) {
// For now that's enough, we should probably test more things
return true;
} else {
return false;
}
}
} }