antenna-fyi 1.3.3 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/core.js +10 -1
- package/lib/hermes-plugin/plugin.yaml +1 -1
- package/package.json +1 -1
- package/skill/SKILL.md +3 -1
package/lib/core.js
CHANGED
|
@@ -334,8 +334,9 @@ export async function checkMatches({ device_id, supabaseUrl, supabaseKey }) {
|
|
|
334
334
|
you_shared: m.you_shared || null,
|
|
335
335
|
}));
|
|
336
336
|
|
|
337
|
+
const incomingOffset = mutualMatches.length;
|
|
337
338
|
const incomingAccepts = (raw.incoming_accepts || []).map((m, i) => ({
|
|
338
|
-
ref: String(i + 1),
|
|
339
|
+
ref: String(incomingOffset + i + 1),
|
|
339
340
|
_device_id: m.target_id,
|
|
340
341
|
name: m.name || "匿名",
|
|
341
342
|
emoji: m.emoji || "👤",
|
|
@@ -353,6 +354,14 @@ export async function checkMatches({ device_id, supabaseUrl, supabaseKey }) {
|
|
|
353
354
|
messages.push("你接受了一些匹配,但对方还没有回应。耐心等等 ⏳");
|
|
354
355
|
}
|
|
355
356
|
|
|
357
|
+
// Persist ref map so accept(ref) resolves correctly
|
|
358
|
+
const _refMap = {};
|
|
359
|
+
for (const m of mutualMatches) _refMap[m.ref] = m._device_id;
|
|
360
|
+
for (const m of incomingAccepts) _refMap[m.ref] = m._device_id;
|
|
361
|
+
if (device_id && Object.keys(_refMap).length > 0) {
|
|
362
|
+
try { await sb.rpc("save_scan_refs", { p_owner: device_id, p_refs: _refMap }); } catch { /* best effort */ }
|
|
363
|
+
}
|
|
364
|
+
|
|
356
365
|
return {
|
|
357
366
|
mutual_matches: mutualMatches,
|
|
358
367
|
incoming_accepts: incomingAccepts,
|
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -344,7 +344,7 @@ Scan people in an event. No distance limit - returns all participants.
|
|
|
344
344
|
- Returns profiles with `source: "event"` tag
|
|
345
345
|
|
|
346
346
|
### `antenna_event_checkin`
|
|
347
|
-
Check in at an event
|
|
347
|
+
Check in at an event — marks you as present at the event location. Optionally updates GPS.
|
|
348
348
|
- `code`: event code
|
|
349
349
|
- `sender_id`, `channel`: from context
|
|
350
350
|
- `chat_id`: REQUIRED for notifications
|
|
@@ -352,6 +352,7 @@ Check in at an event - marks you as present at the event location. Optionally up
|
|
|
352
352
|
- **Event must have started** (`starts_at <= now`). Cannot check in before start time.
|
|
353
353
|
- **Must be within 1km** of event location.
|
|
354
354
|
- **Must have `status: active`** (approved participants only, not pending).
|
|
355
|
+
- **Check-in is automatic on join.** Only call this manually if the user explicitly asks to check in. Do not prompt the user about check-in.
|
|
355
356
|
|
|
356
357
|
### `antenna_event_upload_image`
|
|
357
358
|
Upload an image for an event OG preview. Returns a public URL.
|
|
@@ -414,6 +415,7 @@ Share the event URL with the user.
|
|
|
414
415
|
- If screening questions returned: **ask the user each question**, collect answers, then call `antenna_event_join(code, application_context="answers")` again
|
|
415
416
|
- If `status: pending` → "waiting for organizer approval"
|
|
416
417
|
- If `status: active` → user is in! Auto check-in if event started + GPS within 1km.
|
|
418
|
+
- **Do NOT ask the user about check-in.** Check-in is automatic — if the response has `checked_in: true`, just confirm they're in. If `checked_in: false`, ignore it silently. Users don't need to know about or manage check-in.
|
|
417
419
|
|
|
418
420
|
### Scanning an event
|
|
419
421
|
1. Call `antenna_event_scan(code)`
|