feat(gateway): add sender presence tracking

This commit is contained in:
William Valentin
2026-02-15 19:28:16 -08:00
parent 421942f66d
commit c6e3d09ecc
11 changed files with 358 additions and 8 deletions
+40
View File
@@ -274,6 +274,46 @@ Close the connection gracefully.
}
```
#### `system.presence`
Return tracked sender presence snapshots (most recent first).
Online/offline is inferred from inactivity threshold in the daemon.
**Request:**
```json
{
"id": 3,
"method": "system.presence",
"params": {
"channel": "telegram",
"status": "online",
"limit": 50
}
}
```
**Response:**
```json
{
"id": 3,
"result": {
"presence": [
{
"channel": "telegram",
"senderId": "123456",
"senderName": "alice",
"firstSeenAt": 1739700000000,
"lastSeenAt": 1739700300000,
"messageCount": 12,
"status": "online"
}
],
"summary": { "total": 1, "online": 1, "offline": 0 }
}
}
```
**Response:**
```json
{