summaryrefslogtreecommitdiff
path: root/src/client/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/components')
-rw-r--r--src/client/components/note-detailed.vue10
-rw-r--r--src/client/components/note.vue10
2 files changed, 2 insertions, 18 deletions
diff --git a/src/client/components/note-detailed.vue b/src/client/components/note-detailed.vue
index 4ad3d2d898..1ef3f43389 100644
--- a/src/client/components/note-detailed.vue
+++ b/src/client/components/note-detailed.vue
@@ -350,15 +350,7 @@ export default defineComponent({
capture(withHandler = false) {
if (this.$i) {
- this.connection.send('sn', { id: this.appearNote.id });
- if (this.appearNote.userId !== this.$i.id) {
- if (this.appearNote.mentions && this.appearNote.mentions.includes(this.$i.id)) {
- this.connection.send('readMention', { id: this.appearNote.id });
- }
- if (this.appearNote.visibleUserIds && this.appearNote.visibleUserIds.includes(this.$i.id)) {
- this.connection.send('readSpecifiedNote', { id: this.appearNote.id });
- }
- }
+ this.connection.send(document.body.contains(this.$el) ? 'sn' : 's', { id: this.appearNote.id });
if (withHandler) this.connection.on('noteUpdated', this.onStreamNoteUpdated);
}
},
diff --git a/src/client/components/note.vue b/src/client/components/note.vue
index 3b59afd71d..65e09b7802 100644
--- a/src/client/components/note.vue
+++ b/src/client/components/note.vue
@@ -325,15 +325,7 @@ export default defineComponent({
capture(withHandler = false) {
if (this.$i) {
- this.connection.send('sn', { id: this.appearNote.id });
- if (this.appearNote.userId !== this.$i.id) {
- if (this.appearNote.mentions && this.appearNote.mentions.includes(this.$i.id)) {
- this.connection.send('readMention', { id: this.appearNote.id });
- }
- if (this.appearNote.visibleUserIds && this.appearNote.visibleUserIds.includes(this.$i.id)) {
- this.connection.send('readSpecifiedNote', { id: this.appearNote.id });
- }
- }
+ this.connection.send(document.body.contains(this.$el) ? 'sn' : 's', { id: this.appearNote.id });
if (withHandler) this.connection.on('noteUpdated', this.onStreamNoteUpdated);
}
},