0以下のリアクションは送らないように Resolve #6263 (#6264)

This commit is contained in:
MeiMei 2020-04-16 00:45:43 +09:00 committed by GitHub
parent abc46da944
commit d17b07d421

View file

@ -26,6 +26,8 @@ export function convertLegacyReactions(reactions: Record<string, number>) {
const _reactions = {} as Record<string, number>; const _reactions = {} as Record<string, number>;
for (const reaction of Object.keys(reactions)) { for (const reaction of Object.keys(reactions)) {
if (reactions[reaction] <= 0) continue;
if (Object.keys(legacies).includes(reaction)) { if (Object.keys(legacies).includes(reaction)) {
if (_reactions[legacies[reaction]]) { if (_reactions[legacies[reaction]]) {
_reactions[legacies[reaction]] += reactions[reaction]; _reactions[legacies[reaction]] += reactions[reaction];