From f81baa373cf42a4415551e5bd975bafe20767236 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 20 Sep 2023 21:20:22 -0700 Subject: [PATCH] chore: :art: format --- .../backend/src/models/repositories/note.ts | 3 ++- .../src/remote/activitypub/kernel/like.ts | 6 +----- packages/client/src/scripts/helpMenu.ts | 18 ++++++++++-------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/packages/backend/src/models/repositories/note.ts b/packages/backend/src/models/repositories/note.ts index c36d8c2c8d..75b8cac288 100644 --- a/packages/backend/src/models/repositories/note.ts +++ b/packages/backend/src/models/repositories/note.ts @@ -199,7 +199,8 @@ export const NoteRepository = db.getRepository(Note).extend({ host, ); - const lang = detectLanguage_(`${note.cw ?? ''}\n${note.text ?? ''}`) ?? "unknown" + const lang = + detectLanguage_(`${note.cw ?? ""}\n${note.text ?? ""}`) ?? "unknown"; const reactionEmoji = await populateEmojis(reactionEmojiNames, host); const packed: Packed<"Note"> = await awaitAll({ id: note.id, diff --git a/packages/backend/src/remote/activitypub/kernel/like.ts b/packages/backend/src/remote/activitypub/kernel/like.ts index 7162955187..eb5ff556cc 100644 --- a/packages/backend/src/remote/activitypub/kernel/like.ts +++ b/packages/backend/src/remote/activitypub/kernel/like.ts @@ -12,11 +12,7 @@ export default async (actor: CacheableRemoteUser, activity: ILike) => { await extractEmojis(activity.tag || [], actor.host).catch(() => null); - return await create( - actor, - note, - activity.content || activity.name, - ) + return await create(actor, note, activity.content || activity.name) .catch((e) => { if (e.id === "51c42bb4-931a-456b-bff7-e5a8a70dd298") { return "skip: already reacted"; diff --git a/packages/client/src/scripts/helpMenu.ts b/packages/client/src/scripts/helpMenu.ts index 16f09674cf..fb3f1c1cfa 100644 --- a/packages/client/src/scripts/helpMenu.ts +++ b/packages/client/src/scripts/helpMenu.ts @@ -24,14 +24,16 @@ export function openHelpMenu_(ev: MouseEvent) { icon: "ph-lightbulb ph-bold ph-lg", to: "/about-firefish", }, - instance.tosUrl ? { - type: "button", - text: i18n.ts.tos, - icon: "ph-scroll ph-bold ph-lg", - action: () => { - window.open(instance.tosUrl, "_blank"); - }, - } : null, + instance.tosUrl + ? { + type: "button", + text: i18n.ts.tos, + icon: "ph-scroll ph-bold ph-lg", + action: () => { + window.open(instance.tosUrl, "_blank"); + }, + } + : null, { type: "button", text: i18n.ts.apps,