You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2026-01-03 23:22:30 +03:00
Avoid a packetstorm of device queries on startup
Two main changes here: * when we get an m.new_device event for a device we know about, ignore it * Batch up the m.new_device events received during initialsync and spam out all the queries at once.
This commit is contained in:
@@ -371,21 +371,6 @@ describe("MatrixClient", function() {
|
||||
|
||||
httpBackend.flush();
|
||||
});
|
||||
|
||||
it("should return a rejected promise if the request fails", function(done) {
|
||||
httpBackend.when("POST", "/keys/query").respond(400);
|
||||
|
||||
var exceptionThrown;
|
||||
client.downloadKeys(["bottom"]).then(function() {
|
||||
fail("download didn't fail");
|
||||
}, function(err) {
|
||||
exceptionThrown = err;
|
||||
}).then(function() {
|
||||
expect(exceptionThrown).toBeTruthy();
|
||||
}).catch(utils.failTest).done(done);
|
||||
|
||||
httpBackend.flush();
|
||||
});
|
||||
});
|
||||
|
||||
describe("deleteDevice", function() {
|
||||
|
||||
Reference in New Issue
Block a user