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(); const result = new Map();
for (const reaction in reactions) { for (const reaction in reactions) {
if (reactions[reaction] <= 0) continue; if (reactions[reaction] <= 0) continue;
const decoded = decodeReaction(reaction).reaction; const decoded = decodeReaction(reaction).reaction;
result.set(decoded, (result.get(decoded) || 0) + reactions[reaction]); result.set(decoded, (result.get(decoded) || 0) + reactions[reaction]);
} }
return Object.fromEntries(result); return Object.fromEntries(result);

View file

@ -14,10 +14,7 @@ import {
import type { Packed } from "@/misc/schema.js"; import type { Packed } from "@/misc/schema.js";
import { nyaize } from "@/misc/nyaize.js"; import { nyaize } from "@/misc/nyaize.js";
import { awaitAll } from "@/prelude/await-all.js"; import { awaitAll } from "@/prelude/await-all.js";
import { import { convertReactions, decodeReaction } from "@/misc/reaction-lib.js";
convertReactions,
decodeReaction,
} from "@/misc/reaction-lib.js";
import type { NoteReaction } from "@/models/entities/note-reaction.js"; import type { NoteReaction } from "@/models/entities/note-reaction.js";
import { import {
aggregateNoteEmojis, aggregateNoteEmojis,