1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

actually filter /messages

This commit is contained in:
Matthew Hodgson
2016-09-07 22:04:12 +01:00
parent 91f8df8d19
commit dac820f957
2 changed files with 23 additions and 0 deletions

View File

@@ -51,6 +51,14 @@ function Filter(userId, filterId) {
this.definition = {};
}
/**
* Get the ID of this filter on your homeserver (if known)
* @return {?Number} The filter ID
*/
Filter.prototype.getFilterId = function() {
return this.filterId;
};
/**
* Get the JSON body of the filter.
* @return {Object} The filter definition
@@ -126,6 +134,14 @@ Filter.prototype.setDefinition = function(definition) {
// this._account_data_filter = new FilterComponent(definition.account_data || {});
};
/**
* Get the room.timeline filter component of the filter
* @return {FilterComponent} room timeline filter component
*/
Filter.prototype.getRoomTimelineFilterComponent = function() {
return this._room_timeline_filter;
};
/**
* Filter the list of events based on whether they are allowed in a timeline
* based on this filter