add ignoreRemote filter to InternalEventService

This commit is contained in:
Hazelnoot 2025-06-05 12:54:58 -04:00
parent f446d77cb5
commit 1f2742ddd7
2 changed files with 6 additions and 5 deletions

View file

@ -70,8 +70,8 @@ export class FakeInternalEventService extends InternalEventService {
public async emit<K extends keyof InternalEventTypes>(type: K, value: InternalEventTypes[K], isLocal = true): Promise<void> {
for (const listener of this._listeners) {
if (listener[0] === type) {
if (!isLocal || !listener[2].ignoreLocal) {
await listener[1](value, type);
if ((isLocal && !listener[2].ignoreLocal) || (!isLocal && !listener[2].ignoreRemote)) {
await listener[1](value, type, isLocal);
}
}
}