Fix issue #61: Fix tests
All checks were successful
Test / test (push) Successful in 2s

This commit is contained in:
Gitea OpenCode Agent
2026-10-15 14:20:26 +00:00
parent 20128d195b
commit d8900cfb7f
5 changed files with 58 additions and 18 deletions

View File

@@ -23,6 +23,7 @@ let updatingPairingStatus = false;
let linkedCampaignName = "";
let linkProblem = "";
let actorSyncTimeout;
let characterSyncRetryTimeout;
let characterSyncRunning = false;
let actorSyncErrorLogged = false;
const syncingActorIds = new Set();
@@ -1223,6 +1224,14 @@ async function reconcileDragonrollCharacters() {
}
}
// Both sides converge on a timer that only runs while the world is open, so a
// round that could not reach Dragonroll is asked for again in a while instead of
// leaving the campaign with whatever it happened to receive.
function scheduleDragonrollCharacterSync(delay = 15000) {
clearTimeout(characterSyncRetryTimeout);
characterSyncRetryTimeout = setTimeout(reconcileDragonrollCharacters, delay);
}
async function initializeCharacterSync() {
if (!getSyncToken() || !game.user?.isGM || !game.world || !isAutoSyncEnabled()) return;
try {