implement hsapi /keys/query method

This commit is contained in:
Bruno Windels 2020-08-31 14:24:09 +02:00
parent 2e67b2b6b8
commit 4ef5d4b3b8
2 changed files with 5 additions and 1 deletions

View File

@ -137,7 +137,7 @@ export class DeviceTracker {
// TODO: we need to handle the race here between /sync and /keys/query just like we need to do for the member list ...
// there are multiple requests going out for /keys/query though and only one for /members
const deviceKeyResponse = await hsApi.keysQuery({
const deviceKeyResponse = await hsApi.queryKeys({
"timeout": 10000,
"device_keys": userIds.reduce((deviceKeysMap, userId) => {
deviceKeysMap[userId] = [];

View File

@ -164,6 +164,10 @@ export class HomeServerApi {
return this._post("/keys/upload", null, payload, options);
}
queryKeys(queryRequest, options = null) {
return this._post("/keys/query", null, queryRequest, options);
}
get mediaRepository() {
return this._mediaRepository;
}