[headless] don't use putAll for a single field

This commit is contained in:
Torsten Grote
2018-11-07 15:22:52 -03:00
parent 8b3983ef9e
commit efc85fb88f

View File

@@ -23,13 +23,10 @@ internal fun ConversationMessageHeader.output(contactId: ContactId, text: String
return dict return dict
} }
internal fun PrivateMessageHeader.output(contactId: ContactId, text: String?): JsonDict { internal fun PrivateMessageHeader.output(contactId: ContactId, text: String?) =
val dict = (this as ConversationMessageHeader).output(contactId, text) (this as ConversationMessageHeader).output(contactId, text).apply {
dict.putAll( put("type", "PrivateMessage")
"type" to "PrivateMessage" }
)
return dict
}
/** /**
* Use only for outgoing messages that were just sent * Use only for outgoing messages that were just sent