mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 05:31:21 +03:00
Merge pull request #1449 from vector-im/feature/fix_1444
Wrong /query request (#1444)
This commit is contained in:
commit
e7ba0a5c60
3 changed files with 4 additions and 3 deletions
|
@ -18,6 +18,7 @@ Bugfix 🐛:
|
|||
- Reply composer overlay stays on screen too long after send (#1169)
|
||||
- Fix navigation bar icon contrast on API in [21,27[ (#1342)
|
||||
- Fix status bar icon contrast on API in [21,23[
|
||||
- Wrong /query request (#1444)
|
||||
|
||||
Translations 🗣:
|
||||
-
|
||||
|
|
|
@ -36,7 +36,7 @@ internal data class KeysQueryBody(
|
|||
* A map from user ID, to a list of device IDs, or to an empty list to indicate all devices for the corresponding user.
|
||||
*/
|
||||
@Json(name = "device_keys")
|
||||
val deviceKeys: Map<String, Any>,
|
||||
val deviceKeys: Map<String, List<String>>,
|
||||
|
||||
/**
|
||||
* If the client is fetching keys as a result of a device update received in a sync request, this should be the 'since' token
|
||||
|
|
|
@ -27,7 +27,7 @@ import javax.inject.Inject
|
|||
internal interface DownloadKeysForUsersTask : Task<DownloadKeysForUsersTask.Params, KeysQueryResponse> {
|
||||
data class Params(
|
||||
// the list of users to get keys for.
|
||||
val userIds: List<String>?,
|
||||
val userIds: List<String>,
|
||||
// the up-to token
|
||||
val token: String?
|
||||
)
|
||||
|
@ -39,7 +39,7 @@ internal class DefaultDownloadKeysForUsers @Inject constructor(
|
|||
) : DownloadKeysForUsersTask {
|
||||
|
||||
override suspend fun execute(params: DownloadKeysForUsersTask.Params): KeysQueryResponse {
|
||||
val downloadQuery = params.userIds?.associateWith { emptyMap<String, Any>() }.orEmpty()
|
||||
val downloadQuery = params.userIds.associateWith { emptyList<String>() }
|
||||
|
||||
val body = KeysQueryBody(
|
||||
deviceKeys = downloadQuery,
|
||||
|
|
Loading…
Reference in a new issue