You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-28 05:03:59 +03:00
fix syntax
This commit is contained in:
@@ -34,7 +34,7 @@ function _matches_wildcard(actual_value, filter_value) {
|
||||
*
|
||||
* This is all ported from synapse's Filter object.
|
||||
*/
|
||||
FilterComponent = function(filter_json) {
|
||||
function FilterComponent(filter_json) {
|
||||
this.filter_json = filter_json;
|
||||
|
||||
this.types = filter_json.types || null;
|
||||
@@ -65,7 +65,7 @@ FilterComponent.prototype.check = function(event) {
|
||||
event.room_id,
|
||||
sender,
|
||||
event.type,
|
||||
event.content ? event.content.url !== undefined : false,
|
||||
event.content ? event.content.url !== undefined : false
|
||||
);
|
||||
};
|
||||
|
||||
@@ -73,7 +73,8 @@ FilterComponent.prototype.check = function(event) {
|
||||
* Checks whether the filter matches the given event fields.
|
||||
*/
|
||||
FilterComponent.prototype.checkFields =
|
||||
function(room_id, sender, event_type, contains_url) {
|
||||
function(room_id, sender, event_type, contains_url)
|
||||
{
|
||||
var literal_keys = {
|
||||
"rooms": function(v) { return room_id === v; },
|
||||
"senders": function(v) { return sender === v; },
|
||||
@@ -104,7 +105,6 @@ FilterComponent.prototype.checkFields =
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
FilterComponent.prototype.filter = function(events) {
|
||||
|
||||
Reference in New Issue
Block a user