mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 19:45:05 +01:00
implement hsapi /keys/query method
This commit is contained in:
parent
2e67b2b6b8
commit
4ef5d4b3b8
@ -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 ...
|
// 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
|
// 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,
|
"timeout": 10000,
|
||||||
"device_keys": userIds.reduce((deviceKeysMap, userId) => {
|
"device_keys": userIds.reduce((deviceKeysMap, userId) => {
|
||||||
deviceKeysMap[userId] = [];
|
deviceKeysMap[userId] = [];
|
||||||
|
@ -164,6 +164,10 @@ export class HomeServerApi {
|
|||||||
return this._post("/keys/upload", null, payload, options);
|
return this._post("/keys/upload", null, payload, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
queryKeys(queryRequest, options = null) {
|
||||||
|
return this._post("/keys/query", null, queryRequest, options);
|
||||||
|
}
|
||||||
|
|
||||||
get mediaRepository() {
|
get mediaRepository() {
|
||||||
return this._mediaRepository;
|
return this._mediaRepository;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user