From 69da6fa2951b4c4f0b0d8c94fd1eb888d04f4f7b Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Sat, 11 Feb 2023 17:22:05 -0800 Subject: [PATCH] chore: formatting --- package.json | 2 +- packages/backend/src/misc/check-hit-antenna.ts | 6 +++--- .../backend/src/server/api/endpoints/antennas/create.ts | 5 ++++- .../backend/src/server/api/endpoints/antennas/update.ts | 5 ++++- packages/backend/src/services/note/create.ts | 6 +++++- packages/client/src/os.ts | 4 +++- packages/client/src/pages/my-antennas/editor.vue | 2 +- 7 files changed, 21 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 4a5222f61..d8f8f8dad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "calckey", - "version": "13.2.0-dev1", + "version": "13.2.0-dev2", "codename": "aqua", "repository": { "type": "git", diff --git a/packages/backend/src/misc/check-hit-antenna.ts b/packages/backend/src/misc/check-hit-antenna.ts index 73d9d095a..adcdd190f 100644 --- a/packages/backend/src/misc/check-hit-antenna.ts +++ b/packages/backend/src/misc/check-hit-antenna.ts @@ -79,11 +79,11 @@ export async function checkHitAntenna( getFullApAccount(noteUser.username, noteUser.host).toLowerCase(), ) ) - return false; + return false; } else if (antenna.src === "instances") { const instances = antenna.instances - .filter(x => x !== "") - .map(host => { + .filter((x) => x !== "") + .map((host) => { return host.toLowerCase(); }); if (!instances.includes(noteUser.host?.toLowerCase() ?? "")) return false; diff --git a/packages/backend/src/server/api/endpoints/antennas/create.ts b/packages/backend/src/server/api/endpoints/antennas/create.ts index 1df712f36..c1ba7bcdf 100644 --- a/packages/backend/src/server/api/endpoints/antennas/create.ts +++ b/packages/backend/src/server/api/endpoints/antennas/create.ts @@ -37,7 +37,10 @@ export const paramDef = { type: "object", properties: { name: { type: "string", minLength: 1, maxLength: 100 }, - src: { type: "string", enum: ["home", "all", "users", "list", "group", "instances"] }, + src: { + type: "string", + enum: ["home", "all", "users", "list", "group", "instances"], + }, userListId: { type: "string", format: "misskey:id", nullable: true }, userGroupId: { type: "string", format: "misskey:id", nullable: true }, keywords: { diff --git a/packages/backend/src/server/api/endpoints/antennas/update.ts b/packages/backend/src/server/api/endpoints/antennas/update.ts index c9a32988e..f491c0b63 100644 --- a/packages/backend/src/server/api/endpoints/antennas/update.ts +++ b/packages/backend/src/server/api/endpoints/antennas/update.ts @@ -43,7 +43,10 @@ export const paramDef = { properties: { antennaId: { type: "string", format: "misskey:id" }, name: { type: "string", minLength: 1, maxLength: 100 }, - src: { type: "string", enum: ["home", "all", "users", "list", "group", "instances"] }, + src: { + type: "string", + enum: ["home", "all", "users", "list", "group", "instances"], + }, userListId: { type: "string", format: "misskey:id", nullable: true }, userGroupId: { type: "string", format: "misskey:id", nullable: true }, keywords: { diff --git a/packages/backend/src/services/note/create.ts b/packages/backend/src/services/note/create.ts index b37b160fb..968aed880 100644 --- a/packages/backend/src/services/note/create.ts +++ b/packages/backend/src/services/note/create.ts @@ -1,6 +1,10 @@ import * as mfm from "mfm-js"; import es from "../../db/elasticsearch.js"; -import { publishMainStream, publishNotesStream, publishNoteStream } from "@/services/stream.js"; +import { + publishMainStream, + publishNotesStream, + publishNoteStream, +} from "@/services/stream.js"; import DeliverManager from "@/remote/activitypub/deliver-manager.js"; import renderNote from "@/remote/activitypub/renderer/note.js"; import renderCreate from "@/remote/activitypub/renderer/create.js"; diff --git a/packages/client/src/os.ts b/packages/client/src/os.ts index a0c263572..b25a3431b 100644 --- a/packages/client/src/os.ts +++ b/packages/client/src/os.ts @@ -548,7 +548,9 @@ export async function selectUser() { export async function selectInstance(): Promise { return new Promise((resolve, reject) => { popup( - defineAsyncComponent(() => import("@/components/MkInstanceSelectDialog.vue")), + defineAsyncComponent( + () => import("@/components/MkInstanceSelectDialog.vue"), + ), {}, { ok: (instance) => { diff --git a/packages/client/src/pages/my-antennas/editor.vue b/packages/client/src/pages/my-antennas/editor.vue index 7667a8b23..ee13ecf5e 100644 --- a/packages/client/src/pages/my-antennas/editor.vue +++ b/packages/client/src/pages/my-antennas/editor.vue @@ -142,7 +142,7 @@ async function deleteAntenna() { function addUser() { os.selectUser().then(user => { users = users.trim(); - users += '\n@' + Acct.toString(user as any); + users += `\n@${Acct.toString(user as any)}`; users = users.trim(); }); }