From e31f86aa19cfbcef801cba7d18a2115d73008169 Mon Sep 17 00:00:00 2001 From: naskya Date: Thu, 21 Sep 2023 05:30:13 +0000 Subject: [PATCH] chore: change function name I used `detectLanguage_` in client just because I wanted to use the name `detectLanguage` for another function (and the name `detect` sounds ambiguous) --- packages/backend/src/models/repositories/note.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/models/repositories/note.ts b/packages/backend/src/models/repositories/note.ts index 75b8cac28..0c2478349 100644 --- a/packages/backend/src/models/repositories/note.ts +++ b/packages/backend/src/models/repositories/note.ts @@ -23,7 +23,7 @@ import { } from "@/misc/populate-emojis.js"; import { db } from "@/db/postgre.js"; import { IdentifiableError } from "@/misc/identifiable-error.js"; -import { detect as detectLanguage_ } from "tinyld"; +import { detect as detectLanguage } from "tinyld"; export async function populatePoll(note: Note, meId: User["id"] | null) { const poll = await Polls.findOneByOrFail({ noteId: note.id }); @@ -200,7 +200,7 @@ export const NoteRepository = db.getRepository(Note).extend({ ); const lang = - detectLanguage_(`${note.cw ?? ""}\n${note.text ?? ""}`) ?? "unknown"; + detectLanguage(`${note.cw ?? ""}\n${note.text ?? ""}`) ?? "unknown"; const reactionEmoji = await populateEmojis(reactionEmojiNames, host); const packed: Packed<"Note"> = await awaitAll({ id: note.id,