Call subscriptionUpdate for all update cases

This commit is contained in:
Cooldude2606 committed 2026-05-28 00:38:15 +01:00
1 parent 9bed1223fd
commit 21b050b220
2 files changed
+36 -8

No files matched your search

+9 -7
View File
@@ -348,13 +348,6 @@ export class SubscriptionController {
} else {
subscriber.filters.union(request.filters);
}
if (eventData.subscriptionUpdate) {
const eventReplay = await eventData.subscriptionUpdate(request, src, dst);
if (eventReplay) {
link.sendTo(src, eventReplay);
return true;
}
}
break;
case "replace":
@@ -372,6 +365,15 @@ export class SubscriptionController {
default:
throw new Error(`unreachable case: ${String(request.action)}`);
}
if (eventData.subscriptionUpdate) {
const eventReplay = await eventData.subscriptionUpdate(request, src, dst);
if (eventReplay) {
link.sendTo(src, eventReplay);
return true;
}
}
return false;
}
}