mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 05:39:53 +01:00
[headless] expose contact connected state to REST API
This commit is contained in:
@@ -68,7 +68,8 @@ Returns a JSON array of contacts:
|
||||
"alias" : "A local nickname",
|
||||
"handshakePublicKey": "XnYRd7a7E4CTqgAvh4hCxh/YZ0EPscxknB9ZcEOpSzY=",
|
||||
"verified": true,
|
||||
"lastChatActivity": 1557838312175
|
||||
"lastChatActivity": 1557838312175,
|
||||
"connected": false
|
||||
}
|
||||
```
|
||||
|
||||
@@ -392,3 +393,19 @@ will no longer work on making this `pendingContact` become `contact`.
|
||||
"type": "event"
|
||||
}
|
||||
```
|
||||
|
||||
### A contact connected or disconnected
|
||||
|
||||
When Briar establishes a connection to a contact (the contact comes online),
|
||||
it sends a `ContactConnectedEvent`.
|
||||
When the last connection is lost (the contact goes offline), it sends a `ContactDisconnectedEvent`.
|
||||
|
||||
```json
|
||||
{
|
||||
"data": {
|
||||
"contactId": 1
|
||||
},
|
||||
"name": "ContactConnectedEvent",
|
||||
"type": "event"
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user