Skip to content

Commit

Permalink
Add Relations.add event for additional relations in collection
Browse files Browse the repository at this point in the history
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 element-hq/element-web#9485
Part of element-hq/element-web#9572
  • Loading branch information
jryans committed May 13, 2019
1 parent 7ea820f commit 4b4ba86
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/models/relations.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ export default class Relations extends EventEmitter {
}

this._relations.add(event);

this.emit("Relations.add", event);
}

/**
Expand Down

0 comments on commit 4b4ba86

Please sign in to comment.