From 6e8aa76f2db212c741789a921ebeaa50d257b6e3 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 20 Sep 2023 23:29:48 -0700 Subject: [PATCH] chore: :art: format --- packages/backend/src/misc/reaction-lib.ts | 6 +++--- packages/backend/src/models/repositories/note.ts | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/backend/src/misc/reaction-lib.ts b/packages/backend/src/misc/reaction-lib.ts index 129549505f..77524057d9 100644 --- a/packages/backend/src/misc/reaction-lib.ts +++ b/packages/backend/src/misc/reaction-lib.ts @@ -13,10 +13,10 @@ export function convertReactions(reactions: Record) { const result = new Map(); for (const reaction in reactions) { - if (reactions[reaction] <= 0) continue; + if (reactions[reaction] <= 0) continue; - const decoded = decodeReaction(reaction).reaction; - result.set(decoded, (result.get(decoded) || 0) + reactions[reaction]); + const decoded = decodeReaction(reaction).reaction; + result.set(decoded, (result.get(decoded) || 0) + reactions[reaction]); } return Object.fromEntries(result); diff --git a/packages/backend/src/models/repositories/note.ts b/packages/backend/src/models/repositories/note.ts index f4229eaa82..c8686a9dfa 100644 --- a/packages/backend/src/models/repositories/note.ts +++ b/packages/backend/src/models/repositories/note.ts @@ -14,10 +14,7 @@ import { import type { Packed } from "@/misc/schema.js"; import { nyaize } from "@/misc/nyaize.js"; import { awaitAll } from "@/prelude/await-all.js"; -import { - convertReactions, - decodeReaction, -} from "@/misc/reaction-lib.js"; +import { convertReactions, decodeReaction } from "@/misc/reaction-lib.js"; import type { NoteReaction } from "@/models/entities/note-reaction.js"; import { aggregateNoteEmojis,