diff --git a/src/client/scripts/create-aiscript-env.ts b/src/client/scripts/create-aiscript-env.ts index 863cfadb8d9bff8cbf00e7fac9fe1adb04c82aa9..f6429ba923edadbf2d9462db3c1d67cae9ddf312 100644 --- a/src/client/scripts/create-aiscript-env.ts +++ b/src/client/scripts/create-aiscript-env.ts @@ -20,7 +20,7 @@ export function createAiScriptEnv(vm, opts) { title: title.value, text: text.value, }); - return confirm.canceled ? values.FALSE : values.TRUE + return confirm.canceled ? values.FALSE : values.TRUE; }), 'Mk:api': values.FN_NATIVE(async ([ep, param, token]) => { apiRequests++; diff --git a/src/client/scripts/hpml/lib.ts b/src/client/scripts/hpml/lib.ts index eaa237b7344040b2c6a086d14b3b16510fc870a1..9708581a1175ed1a341dbd960a9a631bc571c6e7 100644 --- a/src/client/scripts/hpml/lib.ts +++ b/src/client/scripts/hpml/lib.ts @@ -26,23 +26,23 @@ export function initLib(hpml: Hpml) { const canvas = hpml.canvases[id.value]; const ctx = canvas.getContext('2d'); return values.OBJ(new Map([ - ['clear_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.clearRect(x.value, y.value, width.value, height.value) })], - ['fill_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.fillRect(x.value, y.value, width.value, height.value) })], - ['stroke_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.strokeRect(x.value, y.value, width.value, height.value) })], - ['fill_text', values.FN_NATIVE(([text, x, y, width]) => { ctx.fillText(text.value, x.value, y.value, width ? width.value : undefined) })], - ['stroke_text', values.FN_NATIVE(([text, x, y, width]) => { ctx.strokeText(text.value, x.value, y.value, width ? width.value : undefined) })], - ['set_line_width', values.FN_NATIVE(([width]) => { ctx.lineWidth = width.value })], - ['set_font', values.FN_NATIVE(([font]) => { ctx.font = font.value })], - ['set_fill_style', values.FN_NATIVE(([style]) => { ctx.fillStyle = style.value })], - ['set_stroke_style', values.FN_NATIVE(([style]) => { ctx.strokeStyle = style.value })], - ['begin_path', values.FN_NATIVE(() => { ctx.beginPath() })], - ['close_path', values.FN_NATIVE(() => { ctx.closePath() })], - ['move_to', values.FN_NATIVE(([x, y]) => { ctx.moveTo(x.value, y.value) })], - ['line_to', values.FN_NATIVE(([x, y]) => { ctx.lineTo(x.value, y.value) })], - ['arc', values.FN_NATIVE(([x, y, radius, startAngle, endAngle]) => { ctx.arc(x.value, y.value, radius.value, startAngle.value, endAngle.value) })], - ['rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.rect(x.value, y.value, width.value, height.value) })], - ['fill', values.FN_NATIVE(() => { ctx.fill() })], - ['stroke', values.FN_NATIVE(() => { ctx.stroke() })], + ['clear_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.clearRect(x.value, y.value, width.value, height.value); })], + ['fill_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.fillRect(x.value, y.value, width.value, height.value); })], + ['stroke_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.strokeRect(x.value, y.value, width.value, height.value); })], + ['fill_text', values.FN_NATIVE(([text, x, y, width]) => { ctx.fillText(text.value, x.value, y.value, width ? width.value : undefined); })], + ['stroke_text', values.FN_NATIVE(([text, x, y, width]) => { ctx.strokeText(text.value, x.value, y.value, width ? width.value : undefined); })], + ['set_line_width', values.FN_NATIVE(([width]) => { ctx.lineWidth = width.value; })], + ['set_font', values.FN_NATIVE(([font]) => { ctx.font = font.value; })], + ['set_fill_style', values.FN_NATIVE(([style]) => { ctx.fillStyle = style.value; })], + ['set_stroke_style', values.FN_NATIVE(([style]) => { ctx.strokeStyle = style.value; })], + ['begin_path', values.FN_NATIVE(() => { ctx.beginPath(); })], + ['close_path', values.FN_NATIVE(() => { ctx.closePath(); })], + ['move_to', values.FN_NATIVE(([x, y]) => { ctx.moveTo(x.value, y.value); })], + ['line_to', values.FN_NATIVE(([x, y]) => { ctx.lineTo(x.value, y.value); })], + ['arc', values.FN_NATIVE(([x, y, radius, startAngle, endAngle]) => { ctx.arc(x.value, y.value, radius.value, startAngle.value, endAngle.value); })], + ['rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.rect(x.value, y.value, width.value, height.value); })], + ['fill', values.FN_NATIVE(() => { ctx.fill(); })], + ['stroke', values.FN_NATIVE(() => { ctx.stroke(); })], ])); }), 'MkPages:chart': values.FN_NATIVE(([id, opts]) => { diff --git a/src/misc/count-same-renotes.ts b/src/misc/count-same-renotes.ts index 0233bdf88e11658b8fbcdd3c8669ba826ea75660..bc1072080ab0a0e873aa263ee82693f0353bcc79 100644 --- a/src/misc/count-same-renotes.ts +++ b/src/misc/count-same-renotes.ts @@ -4,11 +4,11 @@ export async function countSameRenotes(userId: string, renoteId: string, exclude // 指定ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã®æŒ‡å®šã—ãŸãƒŽãƒ¼ãƒˆã®ãƒªãƒŽãƒ¼ãƒˆãŒã„ãã¤ã‚ã‚‹ã‹æ•°ãˆã‚‹ const query = Notes.createQueryBuilder('note') .where('note.userId = :userId', { userId }) - .andWhere('note.renoteId = :renoteId', { renoteId }) + .andWhere('note.renoteId = :renoteId', { renoteId }); // 指定ã—ãŸæŠ•ç¨¿ã‚’除ã if (excludeNoteId) { - query.andWhere('note.id != :excludeNoteId', { excludeNoteId }) + query.andWhere('note.id != :excludeNoteId', { excludeNoteId }); } return await query.getCount(); diff --git a/src/misc/reaction-lib.ts b/src/misc/reaction-lib.ts index e9a9d4f7c909edbfa6ea91942e408643571ae968..b393154d9c065c688d069ed4cda1e6f54fb96bf4 100644 --- a/src/misc/reaction-lib.ts +++ b/src/misc/reaction-lib.ts @@ -78,7 +78,7 @@ export async function toDbReaction(reaction?: string | null, reacterHost?: strin name, }); - if (emoji) return reacterHost ? `:${name}@${reacterHost}:` : `:${name}:` + if (emoji) return reacterHost ? `:${name}@${reacterHost}:` : `:${name}:`; } return await getFallbackReaction(); diff --git a/src/server/api/endpoints/federation/instances.ts b/src/server/api/endpoints/federation/instances.ts index 7f0ad44aa59060394a134106e1f0269e24c6eda1..6b6fe42a403eed6c263790fdca5c03a481dd0159 100644 --- a/src/server/api/endpoints/federation/instances.ts +++ b/src/server/api/endpoints/federation/instances.ts @@ -129,7 +129,7 @@ export default define(meta, async (ps, me) => { } if (ps.host) { - query.andWhere('instance.host like :host', { host: '%' + ps.host.toLowerCase() + '%' }) + query.andWhere('instance.host like :host', { host: '%' + ps.host.toLowerCase() + '%' }); } const instances = await query.take(ps.limit!).skip(ps.offset).getMany(); diff --git a/src/server/api/endpoints/users/search-by-username-and-host.ts b/src/server/api/endpoints/users/search-by-username-and-host.ts index b6ba09d0c0be85ca06c20ad979c69745d09bdb39..8e436ddb9ec93bc33057aa29fe349cfd86e0dd82 100644 --- a/src/server/api/endpoints/users/search-by-username-and-host.ts +++ b/src/server/api/endpoints/users/search-by-username-and-host.ts @@ -69,7 +69,7 @@ export default define(meta, async (ps, me) => { .andWhere('user.host LIKE :host', { host: ps.host.toLowerCase() + '%' }); if (ps.username) { - q.andWhere('user.usernameLower like :username', { username: ps.username.toLowerCase() + '%' }) + q.andWhere('user.usernameLower like :username', { username: ps.username.toLowerCase() + '%' }); } q.andWhere('user.updatedAt IS NOT NULL'); diff --git a/src/services/note/reaction/create.ts b/src/services/note/reaction/create.ts index c650b2e1039d784940249a75cf57d4e5814b3c9b..f3637352c08b1b10ebabac337151666c3f8b6503 100644 --- a/src/services/note/reaction/create.ts +++ b/src/services/note/reaction/create.ts @@ -118,7 +118,7 @@ export default async (user: User, note: Note, reaction?: string) => { const content = renderActivity(await renderLike(inserted, note)); const dm = new DeliverManager(user, content); if (note.userHost !== null) { - const reactee = await Users.findOne(note.userId) + const reactee = await Users.findOne(note.userId); dm.addDirectRecipe(reactee as IRemoteUser); } dm.addFollowersRecipe(); diff --git a/src/services/note/reaction/delete.ts b/src/services/note/reaction/delete.ts index 3f7dda7bc3e9523a7324a6d3e87528af6f01dc44..8d2f0682ca72e182cc3374d77e53b5ba2c00edd3 100644 --- a/src/services/note/reaction/delete.ts +++ b/src/services/note/reaction/delete.ts @@ -48,7 +48,7 @@ export default async (user: User, note: Note) => { const content = renderActivity(renderUndo(await renderLike(exist, note), user)); const dm = new DeliverManager(user, content); if (note.userHost !== null) { - const reactee = await Users.findOne(note.userId) + const reactee = await Users.findOne(note.userId); dm.addDirectRecipe(reactee as IRemoteUser); } dm.addFollowersRecipe(); diff --git a/src/services/note/read.ts b/src/services/note/read.ts index c87513f4891bc12fa4a95ad72aa78bf97bcec826..33fe4f1bf0117e03e1bf479681d7bf7ba1cddeab 100644 --- a/src/services/note/read.ts +++ b/src/services/note/read.ts @@ -68,5 +68,5 @@ export default ( if (!unread) { publishMainStream(userId, 'readAllAntennas'); } - }) + }); });