throw new InvalidJson(response);
}
- if (json.forceBackgroundQueuePerform) {
+ if (response.headers.get("woltlab-background-queue-check") === "yes" || json.forceBackgroundQueuePerform) {
void import("../BackgroundQueue").then((BackgroundQueue) => BackgroundQueue.invoke());
}
}
// force-invoke the background queue
- if (data && data.forceBackgroundQueuePerform) {
+ if (
+ xhr.getResponseHeader("woltlab-background-queue-check") === "yes" ||
+ (data && data.forceBackgroundQueuePerform)
+ ) {
void import("../BackgroundQueue").then((backgroundQueue) => backgroundQueue.invoke());
}
}
catch (e) {
throw new Error_1.InvalidJson(response);
}
- if (json.forceBackgroundQueuePerform) {
+ if (response.headers.get("woltlab-background-queue-check") === "yes" || json.forceBackgroundQueuePerform) {
void new Promise((resolve_1, reject_1) => { require(["../BackgroundQueue"], resolve_1, reject_1); }).then(tslib_1.__importStar).then((BackgroundQueue) => BackgroundQueue.invoke());
}
return json.returnValues;
data.returnValues.template = data.returnValues.template.trim();
}
// force-invoke the background queue
- if (data && data.forceBackgroundQueuePerform) {
+ if (xhr.getResponseHeader("woltlab-background-queue-check") === "yes" ||
+ (data && data.forceBackgroundQueuePerform)) {
void new Promise((resolve_1, reject_1) => { require(["../BackgroundQueue"], resolve_1, reject_1); }).then(tslib_1.__importStar).then((backgroundQueue) => backgroundQueue.invoke());
}
}