Closes #2855
This commit is contained in:
syuilo 2018-10-09 01:50:49 +09:00
parent 51d8de2c38
commit c6110dd996
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
5 changed files with 27 additions and 38 deletions

View file

@ -174,8 +174,7 @@ export default Vue.extend({
this.messages.push(message);
if (message.userId != this.$store.state.i.id && !document.hidden) {
this.connection.send({
type: 'read',
this.connection.send('read', {
id: message.id
});
}
@ -247,8 +246,7 @@ export default Vue.extend({
if (document.hidden) return;
this.messages.forEach(message => {
if (message.userId !== this.$store.state.i.id && !message.isRead) {
this.connection.send({
type: 'read',
this.connection.send('read', {
id: message.id
});
}