diff --git a/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/repository/MessagesRepository.kt b/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/repository/MessagesRepository.kt index 0217cf7c..2de60c9b 100644 --- a/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/repository/MessagesRepository.kt +++ b/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/repository/MessagesRepository.kt @@ -75,9 +75,9 @@ class MessagesRepository(private val api: MessagesService) { suspend fun getMessageDetails(messageId: Int, folderId: Int, read: Boolean, id: Int?): Message { return when (folderId) { - 1 -> api.getInboxMessage(messageId, read, id).handleErrors().data!! - 2 -> api.getOutboxMessage(messageId, read, id).handleErrors().data!! - 3 -> api.getTrashboxMessage(messageId, read, id).handleErrors().data!! + 1 -> api.getInboxMessage(messageId).handleErrors().data!! + 2 -> api.getOutboxMessage(messageId).handleErrors().data!! + 3 -> api.getTrashboxMessage(messageId).handleErrors().data!! else -> throw IllegalArgumentException("Unknown folder id: $folderId") } } diff --git a/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/service/MessagesService.kt b/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/service/MessagesService.kt index fbe2418f..079d952d 100644 --- a/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/service/MessagesService.kt +++ b/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/service/MessagesService.kt @@ -48,27 +48,15 @@ interface MessagesService { @POST("Wiadomosc.mvc/GetInboxMessageDetails") @FormUrlEncoded - suspend fun getInboxMessage( - @Field("messageId") messageId: Int, - @Field("Nieprzeczytana") read: Boolean, - @Field("idWiadomoscAdresat") id: Int? - ): ApiResponse + suspend fun getInboxMessage(@Field("messageId") messageId: Int): ApiResponse @POST("Wiadomosc.mvc/GetOutboxMessageDetails") @FormUrlEncoded - suspend fun getOutboxMessage( - @Field("messageId") messageId: Int, - @Field("Nieprzeczytana") read: Boolean, - @Field("idWiadomoscAdresat") id: Int? - ): ApiResponse + suspend fun getOutboxMessage(@Field("messageId") messageId: Int): ApiResponse @POST("Wiadomosc.mvc/GetTrashboxMessageDetails") @FormUrlEncoded - suspend fun getTrashboxMessage( - @Field("messageId") messageId: Int, - @Field("Nieprzeczytana") read: Boolean, - @Field("idWiadomoscAdresat") id: Int? - ): ApiResponse + suspend fun getTrashboxMessage(@Field("messageId") messageId: Int): ApiResponse @POST("NowaWiadomosc.mvc/InsertWiadomosc") suspend fun sendMessage(