feat(gateway): add sender presence tracking
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user