You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-19 16:42:09 +03:00
Port over push rule eveluator from the angular SDK and make it available on MatrixEvent
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
var PushProcessor = require('../pushprocessor');
|
||||
|
||||
"use strict";
|
||||
/**
|
||||
* This is an internal module. See {@link MatrixEvent} and {@link RoomEvent} for
|
||||
@@ -142,5 +144,13 @@ module.exports.MatrixEvent.prototype = {
|
||||
*/
|
||||
isState: function() {
|
||||
return this.event.state_key !== undefined;
|
||||
},
|
||||
|
||||
getPushActions(client) {
|
||||
if (this.pushActions === undefined) {
|
||||
var pushProcessor = new PushProcessor(client);
|
||||
this.pushActions = pushProcessor.actionsForEvent(this.event);
|
||||
}
|
||||
return this.pushActions;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user