mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 07:43:12 +09:00
Call subscriptionUpdate for all update cases
This commit is contained in:
2 files changed
+36
-8
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user