Find response keeps the unlocked badge list (dropped by the Game Pass response rewrite; test/run.js caught it)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-16 09:12:37 -05:00
parent 73b6cf74db
commit 8856b619b4
+1 -1
View File
@@ -318,7 +318,7 @@ const server = http.createServer(async (req, res) => {
// achievements unlocked by this find: told to the board, posted to Telegram (gated)
const unlocked = social.badgesFor(me.memberId).filter(b => !before.has(b.id));
for (const b of unlocked) notify('badge', { me, id: b.id }).catch(() => {});
return json(res, 200, { ok: true, pol: g.waiting ? 0 : g.rec.pol, nominal: g.rec.nominal, queued: g.queued, capped: g.capped, waiting: g.waiting, note, gamepass: gp.view(me.memberId, me.email),
return json(res, 200, { ok: true, pol: g.waiting ? 0 : g.rec.pol, nominal: g.rec.nominal, queued: g.queued, capped: g.capped, waiting: g.waiting, note, unlocked: unlocked.map(b => b.id), gamepass: gp.view(me.memberId, me.email),
message: g.waiting ? 'Found it. ' + note : g.capped ? 'Found it. ' + note : g.queued ? 'Found it. Today’s POL is spoken for, so yours is queued and pays out next.' : 'Found it. ' + fmt(g.rec.pol) + ' POL is on its way to your wallet.' + (note ? ' ' + note : '') });
}
// ---- Mystery Hunt Box + Ad Detective