1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-12 21:58:58 +09:00
This commit is contained in:
MeiMei 2018-12-29 02:04:29 +09:00 committed by syuilo
parent 8823a6c1a1
commit a9a476a0d5
2 changed files with 19 additions and 0 deletions

View File

@ -75,6 +75,20 @@ props:
ja-JP: "この投稿に対する自分の<a href='/docs/api/reactions'>リアクション</a>"
en-US: "The your <a href='/docs/api/reactions'>reaction</a> of this note"
renoteCount:
type: "number"
optional: false
desc:
ja-JP: "この投稿がRenoteされた数"
en-US: "The number of renotes for this post"
repliesCount:
type: "number"
optional: false
desc:
ja-JP: "この投稿に返信された数"
en-US: "The number of replies to this post"
reactionCounts:
type: "object"
optional: false

View File

@ -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;