summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/components/note-detailed.vue10
-rw-r--r--src/client/components/note.vue10
-rw-r--r--src/client/ui/chat/note.vue10
3 files changed, 27 insertions, 3 deletions
diff --git a/src/client/components/note-detailed.vue b/src/client/components/note-detailed.vue
index 1ef3f43389..4ad3d2d898 100644
--- a/src/client/components/note-detailed.vue
+++ b/src/client/components/note-detailed.vue
@@ -350,7 +350,15 @@ export default defineComponent({
capture(withHandler = false) {
if (this.$i) {
- this.connection.send(document.body.contains(this.$el) ? 'sn' : 's', { id: this.appearNote.id });
+ 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 });
+ }
+ }
if (withHandler) this.connection.on('noteUpdated', this.onStreamNoteUpdated);
}
},
diff --git a/src/client/components/note.vue b/src/client/components/note.vue
index 65e09b7802..3b59afd71d 100644
--- a/src/client/components/note.vue
+++ b/src/client/components/note.vue
@@ -325,7 +325,15 @@ export default defineComponent({
capture(withHandler = false) {
if (this.$i) {
- this.connection.send(document.body.contains(this.$el) ? 'sn' : 's', { id: this.appearNote.id });
+ 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 });
+ }
+ }
if (withHandler) this.connection.on('noteUpdated', this.onStreamNoteUpdated);
}
},
diff --git a/src/client/ui/chat/note.vue b/src/client/ui/chat/note.vue
index 5a4a13d889..29bc61d9c5 100644
--- a/src/client/ui/chat/note.vue
+++ b/src/client/ui/chat/note.vue
@@ -325,7 +325,15 @@ export default defineComponent({
capture(withHandler = false) {
if (this.$i) {
- this.connection.send(document.body.contains(this.$el) ? 'sn' : 's', { id: this.appearNote.id });
+ 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 });
+ }
+ }
if (withHandler) this.connection.on('noteUpdated', this.onStreamNoteUpdated);
}
},