better note read handling
This commit is contained in:
parent
630464f38d
commit
667d58bad4
15 changed files with 109 additions and 66 deletions
|
|
@ -18,18 +18,22 @@ export default class extends Channel {
|
|||
case 'notification': {
|
||||
if (this.muting.has(body.userId)) return;
|
||||
if (body.note && body.note.isHidden) {
|
||||
body.note = await Notes.pack(body.note.id, this.user, {
|
||||
const note = await Notes.pack(body.note.id, this.user, {
|
||||
detail: true
|
||||
});
|
||||
this.connection.cacheNote(note);
|
||||
body.note = note;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'mention': {
|
||||
if (this.muting.has(body.userId)) return;
|
||||
if (body.isHidden) {
|
||||
body = await Notes.pack(body.id, this.user, {
|
||||
const note = await Notes.pack(body.id, this.user, {
|
||||
detail: true
|
||||
});
|
||||
this.connection.cacheNote(note);
|
||||
body = note;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue