Skip to content

Commit

Permalink
Fix DirectChat code.
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWoodworth committed Jan 3, 2020
1 parent d0d2d2f commit d565045
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ private class DirectChatImpl(
fun DirectChat(
fromUser: User,
toUser: User
): DirectChat = DirectChat(
): DirectChat = DirectChatImpl(
fromUser = fromUser,
toUser = toUser
)
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class DirectChatContext internal constructor(
@Serializable
class Response(
val count: Int,
val messages: List<JsonObject>
val direct_messages: List<JsonObject>
)

val response = client.httpClient.sendApiV3Request(
Expand All @@ -66,7 +66,7 @@ class DirectChatContext internal constructor(
response.data
)

return responseJson.response!!.messages
return responseJson.response!!.direct_messages
.map { DirectSentMessageInfo(chat, it) }
}

Expand Down

0 comments on commit d565045

Please sign in to comment.