From 4b4ba861679a044d0681af1352a902528e81ae5b Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Thu, 9 May 2019 18:29:50 +0100 Subject: [PATCH] Add `Relations.add` event for additional relations in collection This adds a `Relations.add` event that consumers can listen for to be notified each time an additional relation event is added to a relations collection. Part of https://github.com/vector-im/riot-web/issues/9485 Part of https://github.com/vector-im/riot-web/issues/9572 --- src/models/relations.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/models/relations.js b/src/models/relations.js index c19a245d422..78bb74952f0 100644 --- a/src/models/relations.js +++ b/src/models/relations.js @@ -77,6 +77,8 @@ export default class Relations extends EventEmitter { } this._relations.add(event); + + this.emit("Relations.add", event); } /**