diff --git a/src/components/messages/QuickReactions.vue b/src/components/messages/QuickReactions.vue index deb608b..baa69ce 100644 --- a/src/components/messages/QuickReactions.vue +++ b/src/components/messages/QuickReactions.vue @@ -29,7 +29,7 @@ export default { } }, mounted() { - this.reactions = this.timelineSet.getRelationsForEvent(this.event.getId(), 'm.annotation', 'm.reaction'); + this.reactions = this.timelineSet.relations.getChildEventsForEvent(this.event.getId(), 'm.annotation', 'm.reaction'); this.event.on("Event.relationsCreated", this.onRelationsCreated); }, beforeDestroy() { @@ -40,7 +40,7 @@ export default { }, methods: { onRelationsCreated() { - this.reactions = this.timelineSet.getRelationsForEvent(this.event.getId(), 'm.annotation', 'm.reaction'); + this.reactions = this.timelineSet.relations.getChildEventsForEvent(this.event.getId(), 'm.annotation', 'm.reaction'); }, onClickEmoji(emoji) { this.$bubble('send-quick-reaction', {reaction:emoji, event:this.event}); @@ -75,7 +75,7 @@ export default { oldValue.off('Relations.add', this.onAddRelation); } if (newValue) { - newValue.on('Relations.add', this.onAddRelation); + newValue.on('Relations.add', this.onAddRelation); } this.processReactions(); }, diff --git a/src/components/messages/pollMixin.js b/src/components/messages/pollMixin.js index 6bb073f..b1da22f 100644 --- a/src/components/messages/pollMixin.js +++ b/src/components/messages/pollMixin.js @@ -70,8 +70,8 @@ export default { // Look for poll end this.pollEndRelations = - this.timelineSet.getRelationsForEvent(this.event.getId(), "m.reference", "m.poll.end") || - this.timelineSet.getRelationsForEvent(this.event.getId(), "m.reference", "org.matrix.msc3381.poll.end"); + this.timelineSet.relations.getChildEventsForEvent(this.event.getId(), "m.reference", "m.poll.end") || + this.timelineSet.relations.getChildEventsForEvent(this.event.getId(), "m.reference", "org.matrix.msc3381.poll.end"); if (this.pollEndRelations) { const endMessages = this.pollEndRelations.getRelations() || []; if (endMessages.length > 0) { @@ -81,8 +81,8 @@ export default { // Process votes this.pollResponseRelations = - this.timelineSet.getRelationsForEvent(this.event.getId(), "m.reference", "m.poll.response") || - this.timelineSet.getRelationsForEvent(this.event.getId(), "m.reference", "org.matrix.msc3381.poll.response"); + this.timelineSet.relations.getChildEventsForEvent(this.event.getId(), "m.reference", "m.poll.response") || + this.timelineSet.relations.getChildEventsForEvent(this.event.getId(), "m.reference", "org.matrix.msc3381.poll.response"); var userVotes = {}; if (this.pollResponseRelations) { const votes = this.pollResponseRelations.getRelations() || [];