1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-18 05:42:00 +03:00

Add filter integration tests; more bug fixes.

This commit is contained in:
Kegan Dougal
2015-12-08 16:08:04 +00:00
parent 86a162c818
commit c65f32f6a6
3 changed files with 101 additions and 4 deletions

View File

@@ -2072,11 +2072,10 @@ MatrixClient.prototype.search = function(opts, callback) {
/**
* Create a new filter.
* @param {Object} content The HTTP body for the request
* @param {module:client.callback} callback Optional.
* @return {Filter} Resolves to a Filter object.
* @return {module:http-api.MatrixError} Rejects: with an error response.
*/
MatrixClient.prototype.createFilter = function(content, callback) {
MatrixClient.prototype.createFilter = function(content) {
var self = this;
var path = utils.encodeUri("/user/$userId/filter", {
$userId: this.credentials.userId
@@ -2106,7 +2105,7 @@ MatrixClient.prototype.getFilter = function(userId, filterId, allowCached) {
if (allowCached) {
var filter = this.store.getFilter(userId, filterId);
if (filter) {
return filter;
return q(filter);
}
}