Index: lib/filterStorage.js |
=================================================================== |
--- a/lib/filterStorage.js |
+++ b/lib/filterStorage.js |
@@ -192,21 +192,20 @@ |
/** |
* Replaces the list of filters in a subscription by a new list |
* @param {Subscription} subscription filter subscription to be updated |
* @param {Filter[]} filters new filter list |
*/ |
updateSubscriptionFilters(subscription, filters) |
{ |
removeSubscriptionFilters(subscription); |
- subscription.oldFilters = subscription.filters; |
+ let oldFilters = subscription.filters; |
subscription.filters = filters; |
addSubscriptionFilters(subscription); |
- filterNotifier.emit("subscription.updated", subscription); |
- delete subscription.oldFilters; |
+ filterNotifier.emit("subscription.updated", subscription, oldFilters); |
}, |
/** |
* Adds a user-defined filter to the list |
* @param {Filter} filter |
* @param {SpecialSubscription} [subscription] |
* particular group that the filter should be added to |
* @param {number} [position] |