Fix broken emojis after matrix-js-sdk update
This commit is contained in:
parent
a9c5c41113
commit
3f7bed6d56
2 changed files with 7 additions and 7 deletions
|
|
@ -29,7 +29,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
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);
|
this.event.on("Event.relationsCreated", this.onRelationsCreated);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|
@ -40,7 +40,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onRelationsCreated() {
|
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) {
|
onClickEmoji(emoji) {
|
||||||
this.$bubble('send-quick-reaction', {reaction:emoji, event:this.event});
|
this.$bubble('send-quick-reaction', {reaction:emoji, event:this.event});
|
||||||
|
|
|
||||||
|
|
@ -70,8 +70,8 @@ export default {
|
||||||
|
|
||||||
// Look for poll end
|
// Look for poll end
|
||||||
this.pollEndRelations =
|
this.pollEndRelations =
|
||||||
this.timelineSet.getRelationsForEvent(this.event.getId(), "m.reference", "m.poll.end") ||
|
this.timelineSet.relations.getChildEventsForEvent(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", "org.matrix.msc3381.poll.end");
|
||||||
if (this.pollEndRelations) {
|
if (this.pollEndRelations) {
|
||||||
const endMessages = this.pollEndRelations.getRelations() || [];
|
const endMessages = this.pollEndRelations.getRelations() || [];
|
||||||
if (endMessages.length > 0) {
|
if (endMessages.length > 0) {
|
||||||
|
|
@ -81,8 +81,8 @@ export default {
|
||||||
|
|
||||||
// Process votes
|
// Process votes
|
||||||
this.pollResponseRelations =
|
this.pollResponseRelations =
|
||||||
this.timelineSet.getRelationsForEvent(this.event.getId(), "m.reference", "m.poll.response") ||
|
this.timelineSet.relations.getChildEventsForEvent(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", "org.matrix.msc3381.poll.response");
|
||||||
var userVotes = {};
|
var userVotes = {};
|
||||||
if (this.pollResponseRelations) {
|
if (this.pollResponseRelations) {
|
||||||
const votes = this.pollResponseRelations.getRelations() || [];
|
const votes = this.pollResponseRelations.getRelations() || [];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue