Fix issue #17: Foundry Module: Show pairing status

This commit is contained in:
Gitea OpenCode Agent
2026-10-14 12:59:26 +00:00
parent 67ca4b0210
commit ed0b9af00b
6 changed files with 359 additions and 2 deletions

View File

@@ -144,7 +144,10 @@ function makeStubWorld({ autoSync = true } = {}) {
state.game = sandbox.game;
state.actor = (id) => actors.find((document) => document.id === id);
state.syncRequests = () => state.requests.filter((request) => request.href.includes("foundry/sync"));
// Sync pushes only: the pairing status read lives under the same prefix, and it
// tells nothing about what the world sent.
state.syncRequests = () => state.requests.filter((request) => request.href.includes("foundry/sync")
&& !request.href.includes("foundry/sync/status"));
state.fire = async (name, ...args) => {
for (const handler of state.hooks.get(name) || []) await handler(...args);