antenna-fyi 1.2.30 → 1.2.31

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.
Files changed (2) hide show
  1. package/lib/cli.js +18 -0
  2. package/package.json +1 -1
package/lib/cli.js CHANGED
@@ -762,6 +762,7 @@ export async function handleWatch(f) {
762
762
  });
763
763
 
764
764
  // Keep alive — also poll every 2 minutes as fallback
765
+ // (Realtime may not work without SELECT policies)
765
766
  const pollInterval = setInterval(async () => {
766
767
  try {
767
768
  const result = await checkMatches({ device_id: id });
@@ -782,6 +783,23 @@ export async function handleWatch(f) {
782
783
  }
783
784
  }
784
785
  } catch { /* silent */ }
786
+
787
+ // Poll event status changes (approval/rejection)
788
+ try {
789
+ const { data: events } = await sb.rpc("get_my_event_updates", { p_device_id: id });
790
+ for (const ev of (events || [])) {
791
+ const key = `event:${ev.event_id}:${ev.status}`;
792
+ if (!notified.has(key)) {
793
+ notified.add(key);
794
+ saveNotified(notified);
795
+ if (ev.status === "active" && ev.role !== "creator" && ev.role !== "cohost") {
796
+ pushNotify(`✅ Your application to "${ev.event_name}" was approved! You're in.`);
797
+ } else if (ev.status === "rejected") {
798
+ pushNotify(`❌ Your application to "${ev.event_name}" was not approved.`);
799
+ }
800
+ }
801
+ }
802
+ } catch { /* silent */ }
785
803
  }, 2 * 60 * 1000);
786
804
 
787
805
  // Handle Ctrl+C
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antenna-fyi",
3
- "version": "1.2.30",
3
+ "version": "1.2.31",
4
4
  "description": "Antenna — nearby people discovery. CLI + MCP server + OpenClaw skill & plugin, all in one package.",
5
5
  "type": "module",
6
6
  "bin": {