Skip to content

Commit

Permalink
fix(notifications): fix exclude_types parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
outadoc committed Oct 17, 2021
1 parent fddc5a3 commit 1ef46e7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildscript {

allprojects {
group = "fr.outadoc.mastodonk"
version = "0.1-alpha33"
version = "0.1-alpha34"

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ internal class AccountsApiImpl(private val client: MastodonHttpClient) : Account
override suspend fun getRelationships(accountIds: List<String>): List<Relationship>? {
return client.requestOrNull("/api/v1/accounts/relationships") {
method = HttpMethod.Get
accountIds.forEach { parameter("id", it) }
accountIds.forEach { parameter("id[]", it) }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ internal class NotificationsApiImpl(private val client: MastodonHttpClient) : No
excludeTypes
?.map { type -> type.value }
?.forEach { type ->
parameter("exclude_types", type)
parameter("exclude_types[]", type)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal class PollsApiImpl(private val client: MastodonHttpClient) : PollsApi {
method = HttpMethod.Post
contentType(ContentType.Application.Json)
formData {
choices.forEach { append("choices", it) }
choices.forEach { append("choices[]", it) }
}
}
}
Expand Down

0 comments on commit 1ef46e7

Please sign in to comment.