mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-11 18:29:05 +01:00
[headless] don't use putAll for a single field
This commit is contained in:
@@ -23,13 +23,10 @@ internal fun ConversationMessageHeader.output(contactId: ContactId, text: String
|
||||
return dict
|
||||
}
|
||||
|
||||
internal fun PrivateMessageHeader.output(contactId: ContactId, text: String?): JsonDict {
|
||||
val dict = (this as ConversationMessageHeader).output(contactId, text)
|
||||
dict.putAll(
|
||||
"type" to "PrivateMessage"
|
||||
)
|
||||
return dict
|
||||
}
|
||||
internal fun PrivateMessageHeader.output(contactId: ContactId, text: String?) =
|
||||
(this as ConversationMessageHeader).output(contactId, text).apply {
|
||||
put("type", "PrivateMessage")
|
||||
}
|
||||
|
||||
/**
|
||||
* Use only for outgoing messages that were just sent
|
||||
|
||||
Reference in New Issue
Block a user