You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +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.
|
* This is all ported from synapse's Filter object.
|
||||||
*/
|
*/
|
||||||
FilterComponent = function(filter_json) {
|
function FilterComponent(filter_json) {
|
||||||
this.filter_json = filter_json;
|
this.filter_json = filter_json;
|
||||||
|
|
||||||
this.types = filter_json.types || null;
|
this.types = filter_json.types || null;
|
||||||
@@ -65,7 +65,7 @@ FilterComponent.prototype.check = function(event) {
|
|||||||
event.room_id,
|
event.room_id,
|
||||||
sender,
|
sender,
|
||||||
event.type,
|
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.
|
* Checks whether the filter matches the given event fields.
|
||||||
*/
|
*/
|
||||||
FilterComponent.prototype.checkFields =
|
FilterComponent.prototype.checkFields =
|
||||||
function(room_id, sender, event_type, contains_url) {
|
function(room_id, sender, event_type, contains_url)
|
||||||
|
{
|
||||||
var literal_keys = {
|
var literal_keys = {
|
||||||
"rooms": function(v) { return room_id === v; },
|
"rooms": function(v) { return room_id === v; },
|
||||||
"senders": function(v) { return sender === v; },
|
"senders": function(v) { return sender === v; },
|
||||||
@@ -104,7 +105,6 @@ FilterComponent.prototype.checkFields =
|
|||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
FilterComponent.prototype.filter = function(events) {
|
FilterComponent.prototype.filter = function(events) {
|
||||||
|
|||||||
Reference in New Issue
Block a user