mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-21 07:09:56 +01:00
[headless] only include alias in contact's JSON representation if it exists
This commit is contained in:
@@ -8,9 +8,9 @@ import org.briarproject.briar.headless.json.JsonDict
|
|||||||
internal fun Contact.output() = JsonDict(
|
internal fun Contact.output() = JsonDict(
|
||||||
"contactId" to id.int,
|
"contactId" to id.int,
|
||||||
"author" to author.output(),
|
"author" to author.output(),
|
||||||
"alias" to alias,
|
|
||||||
"verified" to isVerified
|
"verified" to isVerified
|
||||||
).apply {
|
).apply {
|
||||||
|
alias?.let { put("alias", it) }
|
||||||
handshakePublicKey?.let { put("handshakePublicKey", it.encoded) }
|
handshakePublicKey?.let { put("handshakePublicKey", it.encoded) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user