chore: 🎨 format

This commit is contained in:
ThatOneCalculator 2023-09-20 23:29:48 -07:00
parent d9274de0a7
commit 6e8aa76f2d
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
2 changed files with 4 additions and 7 deletions

View File

@ -13,10 +13,10 @@ export function convertReactions(reactions: Record<string, number>) {
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);

View File

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