summaryrefslogtreecommitdiff
path: root/src/models/note.ts
diff options
context:
space:
mode:
authorMeiMei <30769358+mei23@users.noreply.github.com>2018-12-29 02:04:29 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2018-12-29 02:04:29 +0900
commita9a476a0d5ef8aa2318b08d2dc8a594da938eb69 (patch)
treeeba082c46afc62a6de78ad434528aacf5434693e /src/models/note.ts
parentフォローしているユーザーからのフォローを自動承認す... (diff)
downloadsharkey-a9a476a0d5ef8aa2318b08d2dc8a594da938eb69.tar.gz
sharkey-a9a476a0d5ef8aa2318b08d2dc8a594da938eb69.tar.bz2
sharkey-a9a476a0d5ef8aa2318b08d2dc8a594da938eb69.zip
Resolve #3786 (#3788)
Diffstat (limited to 'src/models/note.ts')
-rw-r--r--src/models/note.ts5
1 files changed, 5 insertions, 0 deletions
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;