mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Refactor Author.Status into dedicated AuthorInfo class and add alias
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package org.briarproject.bramble.identity
|
||||
|
||||
import org.briarproject.bramble.api.identity.Author
|
||||
import org.briarproject.bramble.api.identity.AuthorInfo
|
||||
import org.briarproject.briar.headless.json.JsonDict
|
||||
|
||||
fun Author.output() = JsonDict(
|
||||
@@ -10,4 +11,4 @@ fun Author.output() = JsonDict(
|
||||
"publicKey" to publicKey
|
||||
)
|
||||
|
||||
fun Author.Status.output() = name.toLowerCase()
|
||||
fun AuthorInfo.Status.output() = name.toLowerCase()
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.briarproject.briar.headless.json.JsonDict
|
||||
internal fun BlogPostHeader.output(text: String) = JsonDict(
|
||||
"text" to text,
|
||||
"author" to author.output(),
|
||||
"authorStatus" to authorStatus.output(),
|
||||
"authorStatus" to authorInfo.status.output(),
|
||||
"type" to type.output(),
|
||||
"id" to id.bytes,
|
||||
"parentId" to parentId?.bytes,
|
||||
|
||||
Reference in New Issue
Block a user