From a9a476a0d5ef8aa2318b08d2dc8a594da938eb69 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sat, 29 Dec 2018 02:04:29 +0900 Subject: Resolve #3786 (#3788) --- src/models/note.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/models/note.ts') diff --git a/src/models/note.ts b/src/models/note.ts index e76fc88a41..f14f4c133d 100644 --- a/src/models/note.ts +++ b/src/models/note.ts @@ -273,6 +273,11 @@ export const pack = async ( // Populate files _note.files = packFileMany(_note.fileIds || []); + // Some counts + _note.renoteCount = _note.renoteCount || 0; + _note.repliesCount = _note.repliesCount || 0; + _note.reactionCounts = _note.reactionCounts || {}; + // 後方互換性のため _note.mediaIds = _note.fileIds; _note.media = _note.files; -- cgit v1.2.3-freya