More receipt fixes
This commit is contained in:
parent
6e38fe2b08
commit
902fa3a171
2 changed files with 78 additions and 77 deletions
|
|
@ -358,7 +358,7 @@ export default {
|
|||
RoomHistoryVisibility,
|
||||
DebugEvent,
|
||||
MessageOperations,
|
||||
VoiceRecorder
|
||||
VoiceRecorder,
|
||||
},
|
||||
|
||||
data() {
|
||||
|
|
@ -563,7 +563,8 @@ export default {
|
|||
{}
|
||||
);
|
||||
const self = this;
|
||||
this.timelineWindow.load(initialEventId, 20)
|
||||
this.timelineWindow
|
||||
.load(initialEventId, 20)
|
||||
.then(() => {
|
||||
console.log("This is", self);
|
||||
self.events = self.timelineWindow.getEvents();
|
||||
|
|
@ -602,9 +603,9 @@ export default {
|
|||
self.restartRRTimer();
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
.catch((err) => {
|
||||
console.log("Error fetching events!", err, this);
|
||||
if (err.errcode == 'M_UNKNOWN' && initialEventId) {
|
||||
if (err.errcode == "M_UNKNOWN" && initialEventId) {
|
||||
// Try again without initial event!
|
||||
this.onRoomJoined(null);
|
||||
} else {
|
||||
|
|
@ -612,7 +613,7 @@ export default {
|
|||
this.events = this.timelineWindow.getEvents();
|
||||
this.initialLoadDone = true;
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
onRoomNotJoined() {
|
||||
|
|
@ -1108,8 +1109,8 @@ export default {
|
|||
// Already sent this or too old...
|
||||
break;
|
||||
}
|
||||
// Is it an incoming event?
|
||||
if (event.getSender() !== this.$matrix.currentUserId) {
|
||||
// Make sure it's not a local echo event...
|
||||
if (!event.getId().startsWith("~")) {
|
||||
// Send read receipt
|
||||
this.$matrix.matrixClient
|
||||
.sendReadReceipt(event)
|
||||
|
|
@ -1166,7 +1167,7 @@ export default {
|
|||
event.file,
|
||||
undefined
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ export default {
|
|||
if (!this.$matrix.currentUser) {
|
||||
return null;
|
||||
}
|
||||
return (this.$matrix.userDisplayName || this.$matrix.currentUser.userId.substring(1)).substring(0, 1).toUpperCase();
|
||||
return (this.$matrix.userDisplayName || this.$matrix.currentUserId.substring(1)).substring(0, 1).toUpperCase();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue