antenna-openclaw-plugin 1.2.32 → 1.2.34

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/index.ts +28 -0
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -1406,6 +1406,34 @@ export default function register(api: any) {
1406
1406
  _notifiedMatches.clear();
1407
1407
  }
1408
1408
  }
1409
+
1410
+ // ── Event approval polling ──
1411
+ for (const deviceId of _knownDeviceIds) {
1412
+ try {
1413
+ const { data: events } = await supabase.rpc("get_my_event_updates", { p_device_id: deviceId });
1414
+ if (!events?.length) continue;
1415
+ const parts = deviceId.split(":");
1416
+ if (parts.length < 2) continue;
1417
+ const channel = parts[0];
1418
+ const userId = parts.slice(1).join(":");
1419
+ for (const ev of events) {
1420
+ const key = `event:${ev.event_id}:${ev.status}`;
1421
+ if (_notifiedMatches.has(key)) continue;
1422
+ _notifiedMatches.add(key);
1423
+ if (ev.status === "active" && ev.role !== "creator" && ev.role !== "cohost") {
1424
+ notifyUser(channel, userId,
1425
+ `[Antenna] ✅ 你的申请已通过!欢迎加入「${ev.event_name}」`,
1426
+ logger,
1427
+ );
1428
+ } else if (ev.status === "rejected") {
1429
+ notifyUser(channel, userId,
1430
+ `[Antenna] ❌ 你的申请未通过「${ev.event_name}」`,
1431
+ logger,
1432
+ );
1433
+ }
1434
+ }
1435
+ } catch { /* silent */ }
1436
+ }
1409
1437
  } catch (err: any) {
1410
1438
  logger.warn("Antenna: match poll error:", err.message);
1411
1439
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antenna-openclaw-plugin",
3
- "version": "1.2.32",
3
+ "version": "1.2.34",
4
4
  "description": "Antenna — agent-mediated nearby people discovery for OpenClaw",
5
5
  "openclaw": {
6
6
  "extensions": ["./index.ts"]