perf(stream): 必要のない既読処理のメッセージが発生しないように (MisskeyIO#907)

This commit is contained in:
あわわわとーにゅ 2025-01-17 18:35:08 +09:00 committed by GitHub
parent 8821e3e81b
commit c4fafbdca7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 50 additions and 13 deletions

View file

@ -90,6 +90,10 @@ class LocalTimelineChannel extends Channel {
}
}
if (this.user && (note.visibleUserIds?.includes(this.user.id) ?? note.mentions?.includes(this.user.id))) {
this.connection.cacheNote(note);
}
if (this.minimize && ['public', 'home'].includes(note.visibility)) {
this.send('note', {
id: note.id, myReaction: note.myReaction,
@ -98,7 +102,6 @@ class LocalTimelineChannel extends Channel {
renote: note.renote?.myReaction ? { myReaction: note.renote.myReaction } : undefined,
});
} else {
this.connection.cacheNote(note);
this.send('note', note);
}
}