Verified Commit 609c90f5 authored by akwizgran's avatar akwizgran Committed by Torsten Grote

Convert Map#put() to assignment.

parent 5cf68fa1
......@@ -18,7 +18,7 @@ internal fun BlogPostHeader.output(body: String): JsonDict {
"timestamp" to timestamp,
"timestampReceived" to timeReceived
)
if (parentId != null) dict.put("parentId", (parentId as MessageId).bytes)
if (parentId != null) dict["parentId"] = (parentId as MessageId).bytes
return dict
}
......
......@@ -17,7 +17,7 @@ internal fun PrivateMessageHeader.output(contactId: ContactId, body: String?): J
"id" to id.bytes,
"groupId" to groupId.bytes
)
if (body != null) dict.put("body", body)
if (body != null) dict["body"] = body
return dict
}
......
......@@ -33,24 +33,24 @@ internal fun IntroductionRequest.output(contactId: ContactId): JsonDict {
internal fun InvitationRequest<*>.output(contactId: ContactId): JsonDict {
val dict = (this as PrivateRequest<*>).output(contactId)
dict.put("canBeOpened", canBeOpened())
dict["canBeOpened"] = canBeOpened()
return dict
}
internal fun BlogInvitationRequest.output(contactId: ContactId): JsonDict {
val dict = (this as InvitationRequest<*>).output(contactId)
dict.put("type", "org.briarproject.briar.api.blog.BlogInvitationRequest")
dict["type"] = "org.briarproject.briar.api.blog.BlogInvitationRequest"
return dict
}
internal fun ForumInvitationRequest.output(contactId: ContactId): JsonDict {
val dict = (this as InvitationRequest<*>).output(contactId)
dict.put("type", "org.briarproject.briar.api.forum.ForumInvitationRequest")
dict["type"] = "org.briarproject.briar.api.forum.ForumInvitationRequest"
return dict
}
internal fun GroupInvitationRequest.output(contactId: ContactId): JsonDict {
val dict = (this as InvitationRequest<*>).output(contactId)
dict.put("type", "org.briarproject.briar.api.privategroup.invitation.GroupInvitationRequest")
dict["type"] = "org.briarproject.briar.api.privategroup.invitation.GroupInvitationRequest"
return dict
}
\ No newline at end of file
......@@ -34,24 +34,24 @@ internal fun IntroductionResponse.output(contactId: ContactId): JsonDict {
internal fun InvitationResponse.output(contactId: ContactId): JsonDict {
val dict = (this as PrivateResponse).output(contactId)
dict.put("shareableId", shareableId.bytes)
dict["shareableId"] = shareableId.bytes
return dict
}
internal fun BlogInvitationResponse.output(contactId: ContactId): JsonDict {
val dict = (this as InvitationResponse).output(contactId)
dict.put("type", "org.briarproject.briar.api.blog.BlogInvitationResponse")
dict["type"] = "org.briarproject.briar.api.blog.BlogInvitationResponse"
return dict
}
internal fun ForumInvitationResponse.output(contactId: ContactId): JsonDict {
val dict = (this as InvitationResponse).output(contactId)
dict.put("type", "org.briarproject.briar.api.blog.BlogInvitationResponse")
dict["type"] = "org.briarproject.briar.api.blog.BlogInvitationResponse"
return dict
}
internal fun GroupInvitationResponse.output(contactId: ContactId): JsonDict {
val dict = (this as InvitationResponse).output(contactId)
dict.put("type", "org.briarproject.briar.api.privategroup.invitation.GroupInvitationResponse")
dict["type"] = "org.briarproject.briar.api.privategroup.invitation.GroupInvitationResponse"
return dict
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment