Add offline state for pending contacts.

This commit is contained in:
akwizgran
2019-06-15 12:27:24 +01:00
parent 9c20e6b333
commit b0e97d787f
6 changed files with 50 additions and 26 deletions

View File

@@ -131,6 +131,7 @@ This will return a JSON array of pending contacts and their states:
The state can be one of these values:
* `waiting_for_connection`
* `offline`
* `connecting`
* `adding_contact`
* `failed`

View File

@@ -16,6 +16,7 @@ internal fun PendingContact.output() = JsonDict(
internal fun PendingContactState.output() = when(this) {
WAITING_FOR_CONNECTION -> "waiting_for_connection"
OFFLINE -> "offline"
CONNECTING -> "connecting"
ADDING_CONTACT -> "adding_contact"
FAILED -> "failed"