summaryrefslogtreecommitdiff
path: root/src/misc
diff options
context:
space:
mode:
authorMeiMei <30769358+mei23@users.noreply.github.com>2020-04-16 00:45:43 +0900
committerGitHub <noreply@github.com>2020-04-16 00:45:43 +0900
commitf32d8b7069391c59a5cd3ff14948e8ce12294e0f (patch)
tree197271b7ebcb550c015ffe8221024894bde502fb /src/misc
parentResolve #6256 (diff)
downloadsharkey-f32d8b7069391c59a5cd3ff14948e8ce12294e0f.tar.gz
sharkey-f32d8b7069391c59a5cd3ff14948e8ce12294e0f.tar.bz2
sharkey-f32d8b7069391c59a5cd3ff14948e8ce12294e0f.zip
0以下のリアクションは送らないように Resolve #6263 (#6264)
Diffstat (limited to 'src/misc')
-rw-r--r--src/misc/reaction-lib.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/misc/reaction-lib.ts b/src/misc/reaction-lib.ts
index e5da5ca4aa..d59fb67a6b 100644
--- a/src/misc/reaction-lib.ts
+++ b/src/misc/reaction-lib.ts
@@ -26,6 +26,8 @@ export function convertLegacyReactions(reactions: Record<string, number>) {
const _reactions = {} as Record<string, number>;
for (const reaction of Object.keys(reactions)) {
+ if (reactions[reaction] <= 0) continue;
+
if (Object.keys(legacies).includes(reaction)) {
if (_reactions[legacies[reaction]]) {
_reactions[legacies[reaction]] += reactions[reaction];