diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-09-19 14:18:34 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-09-19 14:18:34 +0900 |
| commit | d9f0e158a35eec183da77e84a3b038fab645bf62 (patch) | |
| tree | a7cbad45883ff56d35771d849f95dbd911e3e45c /src/server/api | |
| parent | 8.55.0 (diff) | |
| download | sharkey-d9f0e158a35eec183da77e84a3b038fab645bf62.tar.gz sharkey-d9f0e158a35eec183da77e84a3b038fab645bf62.tar.bz2 sharkey-d9f0e158a35eec183da77e84a3b038fab645bf62.zip | |
Implement #2736
Diffstat (limited to 'src/server/api')
| -rw-r--r-- | src/server/api/endpoints/i.ts | 1 | ||||
| -rw-r--r-- | src/server/api/stream/home.ts | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/server/api/endpoints/i.ts b/src/server/api/endpoints/i.ts index 1f99ef2d8d..5aa2070650 100644 --- a/src/server/api/endpoints/i.ts +++ b/src/server/api/endpoints/i.ts @@ -22,6 +22,7 @@ export default (params: any, user: ILocalUser, app: IApp) => new Promise(async ( // Serialize res(await pack(user, user, { detail: true, + includeHasUnreadNotes: true, includeSecrets: isSecure })); diff --git a/src/server/api/stream/home.ts b/src/server/api/stream/home.ts index f1fced42d7..5575d0d523 100644 --- a/src/server/api/stream/home.ts +++ b/src/server/api/stream/home.ts @@ -9,6 +9,7 @@ import readNotification from '../common/read-notification'; import call from '../call'; import { IApp } from '../../../models/app'; import shouldMuteThisNote from '../../../misc/should-mute-this-note'; +import readNote from '../../../services/note/read'; const log = debug('misskey'); @@ -94,6 +95,9 @@ export default async function( if (!msg.id) return; log(`CAPTURE: ${msg.id} by @${user.username}`); subscriber.on(`note-stream:${msg.id}`, onNoteStream); + if (msg.read) { + readNote(user._id, msg.id); + } break; case 'decapture': |