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
Support flushing the cache on calculated push rules
Needed for encrypted events to be able to pass some push rules.
This commit is contained in:
@@ -2299,10 +2299,11 @@ function _membershipChange(client, roomId, userId, membership, reason, callback)
|
||||
* Obtain a dict of actions which should be performed for this event according
|
||||
* to the push rules for this user. Caches the dict on the event.
|
||||
* @param {MatrixEvent} event The event to get push actions for.
|
||||
* @param {boolean} ignoreCache True to skip the cache and recalculate the push rules.
|
||||
* @return {module:pushprocessor~PushAction} A dict of actions to perform.
|
||||
*/
|
||||
MatrixClient.prototype.getPushActionsForEvent = function(event) {
|
||||
if (!event.getPushActions()) {
|
||||
MatrixClient.prototype.getPushActionsForEvent = function(event, ignoreCache = false) {
|
||||
if (!event.getPushActions() || ignoreCache) {
|
||||
event.setPushActions(this._pushProcessor.actionsForEvent(event));
|
||||
}
|
||||
return event.getPushActions();
|
||||
|
||||
Reference in New Issue
Block a user