From bfca45751075f2bb4ba48911149ef50a1d174787 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 6 Nov 2023 11:21:43 +0900 Subject: [PATCH 001/296] enhance(frontend): improve aiscript plugin error handling --- packages/frontend/src/boot/main-boot.ts | 2 +- packages/frontend/src/components/MkNote.vue | 14 ++++++++++---- .../frontend/src/components/MkNoteDetailed.vue | 14 ++++++++++---- packages/frontend/src/components/MkPostForm.vue | 6 +++++- packages/frontend/src/plugin.ts | 12 +++++++++--- 5 files changed, 35 insertions(+), 13 deletions(-) diff --git a/packages/frontend/src/boot/main-boot.ts b/packages/frontend/src/boot/main-boot.ts index b11d0db043c0..887740f4a5d8 100644 --- a/packages/frontend/src/boot/main-boot.ts +++ b/packages/frontend/src/boot/main-boot.ts @@ -58,7 +58,7 @@ export async function mainBoot() { }); for (const plugin of ColdDeviceStorage.get('plugins').filter(p => p.active)) { - import('../plugin').then(async ({ install }) => { + import('@/plugin.js').then(async ({ install }) => { // Workaround for https://bugs.webkit.org/show_bug.cgi?id=242740 await new Promise(r => setTimeout(r, 0)); install(plugin); diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index 0ae3423a2106..cd02f96bc18b 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -202,11 +202,17 @@ let note = $ref(deepClone(props.note)); // plugin if (noteViewInterruptors.length > 0) { onMounted(async () => { - let result:Misskey.entities.Note | null = deepClone(note); + let result: Misskey.entities.Note | null = deepClone(note); for (const interruptor of noteViewInterruptors) { - result = await interruptor.handler(result); - - if (result === null) return isDeleted.value = true; + try { + result = await interruptor.handler(result); + if (result === null) { + isDeleted.value = true; + return; + } + } catch (err) { + console.error(err); + } } note = result; }); diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 1d8049934af5..74dcf08da179 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -239,11 +239,17 @@ let note = $ref(deepClone(props.note)); // plugin if (noteViewInterruptors.length > 0) { onMounted(async () => { - let result:Misskey.entities.Note | null = deepClone(note); + let result: Misskey.entities.Note | null = deepClone(note); for (const interruptor of noteViewInterruptors) { - result = await interruptor.handler(result); - - if (result === null) return isDeleted.value = true; + try { + result = await interruptor.handler(result); + if (result === null) { + isDeleted.value = true; + return; + } + } catch (err) { + console.error(err); + } } note = result; }); diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue index c0fd1c14d7c4..512fb892edc4 100644 --- a/packages/frontend/src/components/MkPostForm.vue +++ b/packages/frontend/src/components/MkPostForm.vue @@ -750,7 +750,11 @@ async function post(ev?: MouseEvent) { // plugin if (notePostInterruptors.length > 0) { for (const interruptor of notePostInterruptors) { - postData = await interruptor.handler(deepClone(postData)); + try { + postData = await interruptor.handler(deepClone(postData)); + } catch (err) { + console.error(err); + } } } diff --git a/packages/frontend/src/plugin.ts b/packages/frontend/src/plugin.ts index 3bc91f6ac4b8..e24f646a3507 100644 --- a/packages/frontend/src/plugin.ts +++ b/packages/frontend/src/plugin.ts @@ -11,10 +11,9 @@ import { Plugin, noteActions, notePostInterruptors, noteViewInterruptors, postFo const parser = new Parser(); const pluginContexts = new Map(); -export function install(plugin: Plugin): void { +export async function install(plugin: Plugin): Promise { // 後方互換性のため if (plugin.src == null) return; - console.info('Plugin installed:', plugin.name, 'v' + plugin.version); const aiscript = new Interpreter(createPluginEnv({ plugin: plugin, @@ -42,7 +41,14 @@ export function install(plugin: Plugin): void { initPlugin({ plugin, aiscript }); - aiscript.exec(parser.parse(plugin.src)); + try { + await aiscript.exec(parser.parse(plugin.src)); + } catch (err) { + console.error('Plugin install failed:', plugin.name, 'v' + plugin.version); + return; + } + + console.info('Plugin installed:', plugin.name, 'v' + plugin.version); } function createPluginEnv(opts: { plugin: Plugin; storageKey: string }): Record { From 828749be6451e2129e6b583dbb2b163cdff51f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8A=E3=81=95=E3=82=80=E3=81=AE=E3=81=B2=E3=81=A8?= <46447427+samunohito@users.noreply.github.com> Date: Mon, 6 Nov 2023 19:26:17 +0900 Subject: [PATCH 002/296] fix #12266 (#12267) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ポップアップの表示後、MkNoteとMkNoteDetailedでそれぞれが持つfocusメソッドを呼び出していたのをやめた Co-authored-by: osamu <46447427+sam-osamu@users.noreply.github.com> --- packages/frontend/src/components/MkNote.vue | 2 +- packages/frontend/src/components/MkNoteDetailed.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index cd02f96bc18b..8a003bdc1cf1 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -304,7 +304,7 @@ function renote(viaKeyboard = false) { const { menu } = getRenoteMenu({ note: note, renoteButton, mock: props.mock }); os.popupMenu(menu, renoteButton.value, { viaKeyboard, - }).then(focus); + }); } function reply(viaKeyboard = false): void { diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 74dcf08da179..920debc88440 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -350,7 +350,7 @@ function renote(viaKeyboard = false) { const { menu } = getRenoteMenu({ note: note, renoteButton }); os.popupMenu(menu, renoteButton.value, { viaKeyboard, - }).then(focus); + }); } function reply(viaKeyboard = false): void { From 2834e54e78c5ca1932aae1661e497aa8c899aab0 Mon Sep 17 00:00:00 2001 From: zyoshoka <107108195+zyoshoka@users.noreply.github.com> Date: Wed, 8 Nov 2023 21:10:41 +0900 Subject: [PATCH 003/296] fix(backend): make token nullable (#12280) --- packages/backend/src/server/api/endpoints/i/revoke-token.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/endpoints/i/revoke-token.ts b/packages/backend/src/server/api/endpoints/i/revoke-token.ts index e8bb2825336d..98d866f867d4 100644 --- a/packages/backend/src/server/api/endpoints/i/revoke-token.ts +++ b/packages/backend/src/server/api/endpoints/i/revoke-token.ts @@ -18,7 +18,7 @@ export const paramDef = { type: 'object', properties: { tokenId: { type: 'string', format: 'misskey:id' }, - token: { type: 'string' }, + token: { type: 'string', nullable: true }, }, anyOf: [ { required: ['tokenId'] }, From b02f724475eabb41a65fa462c674b561240c1ada Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 8 Nov 2023 21:11:30 +0900 Subject: [PATCH 004/296] Update CHANGELOG.md --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee98f4ccb99b..cce678c61442 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,17 @@ --> +## 2023.x.x (unreleased) + +### General +- + +### Client +- + +### Server +- Fix: トークンのないプラグインをアンインストールするときにエラーが出ないように + ## 2023.11.0 ### Note From 879f2d2b7e6d00f108661d00f20056e11406cb83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8A=E3=81=95=E3=82=80=E3=81=AE=E3=81=B2=E3=81=A8?= <46447427+samunohito@users.noreply.github.com> Date: Thu, 9 Nov 2023 21:15:48 +0900 Subject: [PATCH 005/296] =?UTF-8?q?ref=E5=8C=96=E3=81=97=E3=81=9Fnote?= =?UTF-8?q?=E3=81=AE=E5=A4=89=E6=9B=B4=E9=80=9A=E7=9F=A5=E3=81=8CMfm?= =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=83=9D=E3=83=BC=E3=83=8D=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=81=BE=E3=81=A7=E5=88=B0=E9=81=94=E3=81=97=E3=81=A6=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3=20(#12282)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: osamu <46447427+sam-osamu@users.noreply.github.com> --- packages/frontend/src/components/MkNote.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index 8a003bdc1cf1..7e8b4c9b2be2 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -234,8 +234,8 @@ const clipButton = shallowRef(); let appearNote = $computed(() => isRenote ? note.renote as Misskey.entities.Note : note); const isMyRenote = $i && ($i.id === note.userId); const showContent = ref(false); -const parsed = appearNote.text ? mfm.parse(appearNote.text) : null; -const urls = parsed ? extractUrlFromMfm(parsed) : null; +const parsed = $computed(() => appearNote.text ? mfm.parse(appearNote.text) : null); +const urls = $computed(() => parsed ? extractUrlFromMfm(parsed) : null); const isLong = shouldCollapsed(appearNote, urls ?? []); const collapsed = ref(appearNote.cw == null && isLong); const isDeleted = ref(false); From e2cac3d949b1b6d96c1c3a27278781c5a0829697 Mon Sep 17 00:00:00 2001 From: Nya Candy Date: Thu, 9 Nov 2023 20:21:39 +0800 Subject: [PATCH 006/296] fix: show real instance url (#12273) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update CHANGELOG.md * fix: show real instance url --------- Co-authored-by: tamaina Co-authored-by: syuilo Co-authored-by: atsuchan <83960488+atsu1125@users.noreply.github.com> Co-authored-by: Masaya Suzuki <15100604+massongit@users.noreply.github.com> Co-authored-by: Kagami Sascha Rosylight Co-authored-by: taiy <53635909+taiyme@users.noreply.github.com> Co-authored-by: xianon Co-authored-by: kabo2468 <28654659+kabo2468@users.noreply.github.com> Co-authored-by: YS <47836716+yszkst@users.noreply.github.com> Co-authored-by: Khsmty Co-authored-by: Soni L Co-authored-by: mei23 Co-authored-by: daima3629 <52790780+daima3629@users.noreply.github.com> Co-authored-by: Windymelt <1113940+windymelt@users.noreply.github.com> Co-authored-by: Ebise Lutica <7106976+EbiseLutica@users.noreply.github.com> Co-authored-by: nenohi Co-authored-by: Acid Chicken (硫酸鶏) Co-authored-by: rinsuki <428rinsuki+git@gmail.com> Co-authored-by: FineArchs <133759614+FineArchs@users.noreply.github.com> --- packages/backend/src/server/web/ClientServerService.ts | 1 + packages/backend/src/server/web/views/base.pug | 1 + packages/frontend/src/config.ts | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/server/web/ClientServerService.ts b/packages/backend/src/server/web/ClientServerService.ts index 7a2a52a98242..3e35d5415e6b 100644 --- a/packages/backend/src/server/web/ClientServerService.ts +++ b/packages/backend/src/server/web/ClientServerService.ts @@ -175,6 +175,7 @@ export class ClientServerService { serverErrorImageUrl: meta.serverErrorImageUrl ?? 'https://xn--931a.moe/assets/error.jpg', infoImageUrl: meta.infoImageUrl ?? 'https://xn--931a.moe/assets/info.jpg', notFoundImageUrl: meta.notFoundImageUrl ?? 'https://xn--931a.moe/assets/not-found.jpg', + instanceUrl: this.config.url, }; } diff --git a/packages/backend/src/server/web/views/base.pug b/packages/backend/src/server/web/views/base.pug index 9b6c671cadd0..2cb3fd473892 100644 --- a/packages/backend/src/server/web/views/base.pug +++ b/packages/backend/src/server/web/views/base.pug @@ -26,6 +26,7 @@ html meta(name='theme-color' content= themeColor || '#86b300') meta(name='theme-color-orig' content= themeColor || '#86b300') meta(property='og:site_name' content= instanceName || 'Misskey') + meta(property='instance_url' content= instanceUrl) meta(name='viewport' content='width=device-width, initial-scale=1') link(rel='icon' href= icon || '/favicon.ico') link(rel='apple-touch-icon' href= appleTouchIcon || '/apple-touch-icon.png') diff --git a/packages/frontend/src/config.ts b/packages/frontend/src/config.ts index 60fc8c9d3488..9de29e80df30 100644 --- a/packages/frontend/src/config.ts +++ b/packages/frontend/src/config.ts @@ -5,7 +5,7 @@ import { miLocalStorage } from '@/local-storage.js'; -const address = new URL(location.href); +const address = new URL(document.querySelector('meta[property="instance_url"]')?.content || location.href); const siteName = document.querySelector('meta[property="og:site_name"]')?.content; export const host = address.host; From 28e394eddc2b38db1bf2a5bf1059092fda8ce2a2 Mon Sep 17 00:00:00 2001 From: GrapeApple0 <84321396+GrapeApple0@users.noreply.github.com> Date: Thu, 9 Nov 2023 21:35:07 +0900 Subject: [PATCH 007/296] =?UTF-8?q?fix:=20=E6=8A=95=E7=A8=BF=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E3=81=8C=E3=82=AA=E3=83=B3=E3=81=A7=E3=82=82=E3=83=80?= =?UTF-8?q?=E3=82=A4=E3=83=AC=E3=82=AF=E3=83=88=E6=8A=95=E7=A8=BF=E3=81=AF?= =?UTF-8?q?=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E3=81=AB=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=20(#12263)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 投稿通知がオンでもダイレクト投稿はユーザーに通知されないように * Update CHANGELOG.md --- CHANGELOG.md | 1 + packages/backend/src/core/NoteCreateService.ts | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cce678c61442..e4617d0e67e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ ### Server - Fix: トークンのないプラグインをアンインストールするときにエラーが出ないように +- Fix: 投稿通知がオンでもダイレクト投稿はユーザーに通知されないようにされました ## 2023.11.0 diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index acd11a9fa76d..86f220abd093 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -521,11 +521,13 @@ export class NoteCreateService implements OnApplicationShutdown { followeeId: user.id, notify: 'normal', }).then(followings => { - for (const following of followings) { - // TODO: ワードミュート考慮 - this.notificationService.createNotification(following.followerId, 'note', { - noteId: note.id, - }, user.id); + if (note.visibility !== 'specified') { + for (const following of followings) { + // TODO: ワードミュート考慮 + this.notificationService.createNotification(following.followerId, 'note', { + noteId: note.id, + }, user.id); + } } }); } From 7701bf0642e273a8fd459fde1db1612f4eb1e14c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8A=E3=81=95=E3=82=80=E3=81=AE=E3=81=B2=E3=81=A8?= <46447427+samunohito@users.noreply.github.com> Date: Fri, 10 Nov 2023 15:08:12 +0900 Subject: [PATCH 008/296] =?UTF-8?q?=E3=80=8C=E3=81=93=E3=81=AE=E6=A9=9F?= =?UTF-8?q?=E8=83=BD=E3=81=8C=E8=A7=A3=E6=B1=BA=E3=81=99=E3=81=B9=E3=81=8D?= =?UTF-8?q?=E5=85=B7=E4=BD=93=E7=9A=84=E3=81=AA=E5=95=8F=E9=A1=8C=E3=81=BE?= =?UTF-8?q?=E3=81=9F=E3=81=AF=E3=83=8B=E3=83=BC=E3=82=BA=E3=80=81=E3=81=8A?= =?UTF-8?q?=E3=82=88=E3=81=B3=E8=AA=B0=E3=81=8C=E3=81=9D=E3=82=8C=E3=81=AB?= =?UTF-8?q?=E5=BD=B9=E7=AB=8B=E3=81=A4=E3=81=A8=E8=80=83=E3=81=88=E3=81=A6?= =?UTF-8?q?=E3=81=84=E3=82=8B=E3=81=8B=E3=82=92=E8=AA=AC=E6=98=8E=E3=81=97?= =?UTF-8?q?=E3=81=A6=E3=81=8F=E3=81=A0=E3=81=95=E3=81=84=E3=80=82=E3=80=8D?= =?UTF-8?q?=E3=81=A8=E3=81=84=E3=81=86=E6=97=A8=E3=81=AE=E9=A0=85=E7=9B=AE?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0=20(#12253)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: osamu <46447427+sam-osamu@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/02_feature-request.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/02_feature-request.yml b/.github/ISSUE_TEMPLATE/02_feature-request.yml index 17926412ff76..8420475b3e00 100644 --- a/.github/ISSUE_TEMPLATE/02_feature-request.yml +++ b/.github/ISSUE_TEMPLATE/02_feature-request.yml @@ -9,3 +9,9 @@ body: description: Tell us what the suggestion is validations: required: true + - type: textarea + attributes: + label: Purpose + description: Describe the specific problem or need you think this feature will solve, and who it will help. + validations: + required: true \ No newline at end of file From 54870d067bee80fda903d810eb586c02f27c26d1 Mon Sep 17 00:00:00 2001 From: ikasoba <57828948+ikasoba@users.noreply.github.com> Date: Fri, 10 Nov 2023 17:18:23 +0900 Subject: [PATCH 009/296] =?UTF-8?q?aiscript-vscode=E3=81=AE=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E3=82=92=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=20(#12299)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/package.json | 2 +- pnpm-lock.yaml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/frontend/package.json b/packages/frontend/package.json index de74922644dc..25b2fcb4cb6e 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -29,7 +29,7 @@ "@vue/compiler-sfc": "3.3.7", "astring": "1.8.6", "autosize": "6.0.1", - "aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.0.5", + "aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.0.6", "broadcast-channel": "6.0.0", "browser-image-resizer": "github:misskey-dev/browser-image-resizer#v2.2.1-misskey.3", "buraha": "0.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a731705fa214..294dbeb5b318 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -674,8 +674,8 @@ importers: specifier: 3.3.7 version: 3.3.7 aiscript-vscode: - specifier: github:aiscript-dev/aiscript-vscode#v0.0.5 - version: github.com/aiscript-dev/aiscript-vscode/a8fa5bb41885391cdb6a6e3165eaa6e4868da86e + specifier: github:aiscript-dev/aiscript-vscode#v0.0.6 + version: github.com/aiscript-dev/aiscript-vscode/b5a8aa0ad927831a0b867d1c183460a14e6c48cd astring: specifier: 1.8.6 version: 1.8.6 @@ -6931,7 +6931,7 @@ packages: hasBin: true peerDependencies: '@swc/core': ^1.2.66 - chokidar: 3.5.3 + chokidar: ^3.5.1 peerDependenciesMeta: chokidar: optional: true @@ -19784,10 +19784,10 @@ packages: readable-stream: 3.6.0 dev: false - github.com/aiscript-dev/aiscript-vscode/a8fa5bb41885391cdb6a6e3165eaa6e4868da86e: - resolution: {tarball: https://codeload.github.com/aiscript-dev/aiscript-vscode/tar.gz/a8fa5bb41885391cdb6a6e3165eaa6e4868da86e} + github.com/aiscript-dev/aiscript-vscode/b5a8aa0ad927831a0b867d1c183460a14e6c48cd: + resolution: {tarball: https://codeload.github.com/aiscript-dev/aiscript-vscode/tar.gz/b5a8aa0ad927831a0b867d1c183460a14e6c48cd} name: aiscript-vscode - version: 0.0.5 + version: 0.0.6 engines: {vscode: ^1.83.0} dev: false From 253c0c42e2871d3fe4ac959508bed5d93cd01b38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8A=E3=81=95=E3=82=80=E3=81=AE=E3=81=B2=E3=81=A8?= <46447427+samunohito@users.noreply.github.com> Date: Fri, 10 Nov 2023 17:49:09 +0900 Subject: [PATCH 010/296] =?UTF-8?q?=E3=83=87=E3=83=83=E3=82=AD=E3=81=AE?= =?UTF-8?q?=E3=82=AB=E3=83=A9=E3=83=A0=E3=81=8B=E3=82=89=E3=83=AA=E3=83=AD?= =?UTF-8?q?=E3=83=BC=E3=83=89=E3=81=A7=E3=81=8D=E3=82=8B=E6=A9=9F=E8=83=BD?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0=20(#12274)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * デッキのカラムからリロードできる機能を追加 * tweak --------- Co-authored-by: osamu <46447427+sam-osamu@users.noreply.github.com> Co-authored-by: syuilo --- .../frontend/src/components/MkNotifications.vue | 4 ++++ packages/frontend/src/ui/deck/antenna-column.vue | 2 +- packages/frontend/src/ui/deck/channel-column.vue | 2 +- packages/frontend/src/ui/deck/column.vue | 13 +++++++++++++ packages/frontend/src/ui/deck/direct-column.vue | 16 ++++++++++++++-- packages/frontend/src/ui/deck/list-column.vue | 2 +- .../frontend/src/ui/deck/mentions-column.vue | 16 ++++++++++++++-- .../src/ui/deck/notifications-column.vue | 6 ++++-- .../src/ui/deck/role-timeline-column.vue | 2 +- packages/frontend/src/ui/deck/tl-column.vue | 3 ++- 10 files changed, 55 insertions(+), 11 deletions(-) diff --git a/packages/frontend/src/components/MkNotifications.vue b/packages/frontend/src/components/MkNotifications.vue index 77e66f016564..0c817bd64c5a 100644 --- a/packages/frontend/src/components/MkNotifications.vue +++ b/packages/frontend/src/components/MkNotifications.vue @@ -96,6 +96,10 @@ onUnmounted(() => { onDeactivated(() => { if (connection) connection.dispose(); }); + +defineExpose({ + reload, +}); From 4b13179ff919e4424eb60a37db0e72df4bd12101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8A=E3=81=95=E3=82=80=E3=81=AE=E3=81=B2=E3=81=A8?= <46447427+samunohito@users.noreply.github.com> Date: Tue, 21 Nov 2023 20:05:04 +0900 Subject: [PATCH 077/296] =?UTF-8?q?=E3=82=B5=E3=82=A6=E3=83=B3=E3=83=89?= =?UTF-8?q?=E5=86=8D=E7=94=9F=E6=96=B9=E6=B3=95=E3=81=AE=E5=A4=89=E6=9B=B4?= =?UTF-8?q?=E3=81=AB=E8=BF=BD=E5=BE=93=E3=81=A7=E3=81=8D=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F=E6=89=80=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=20(#12368)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: osamu <46447427+sam-osamu@users.noreply.github.com> --- CHANGELOG.md | 1 + packages/frontend/src/scripts/sound.ts | 20 +++++++++---------- .../frontend/src/widgets/WidgetJobQueue.vue | 14 ++++++++++--- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 900d042eaf6f..7feb89b5462d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ ### Client - fix: 「設定のバックアップ」で一部の項目がバックアップに含まれていなかった問題を修正 +- Fix: ウィジェットのジョブキューにて音声の発音方法変更に追従できていなかったのを修正 #12367 ### Server - Fix: 時間経過により無効化されたアンテナを再有効化したとき、サーバ再起動までその状況が反映されないのを修正 #12303 diff --git a/packages/frontend/src/scripts/sound.ts b/packages/frontend/src/scripts/sound.ts index 4b0cd0bb3922..2b604bd98a6e 100644 --- a/packages/frontend/src/scripts/sound.ts +++ b/packages/frontend/src/scripts/sound.ts @@ -61,7 +61,7 @@ export const soundsTypes = [ 'noizenecio/kick_gaba7', ] as const; -export async function getAudio(file: string, useCache = true) { +export async function loadAudio(file: string, useCache = true) { if (useCache && cache.has(file)) { return cache.get(file)!; } @@ -77,12 +77,6 @@ export async function getAudio(file: string, useCache = true) { return audioBuffer; } -export function setVolume(audio: HTMLAudioElement, volume: number): HTMLAudioElement { - const masterVolume = defaultStore.state.sound_masterVolume; - audio.volume = masterVolume - ((1 - volume) * masterVolume); - return audio; -} - export function play(type: 'noteMy' | 'note' | 'antenna' | 'channel' | 'notification') { const sound = defaultStore.state[`sound_${type}`]; if (_DEV_) console.log('play', type, sound); @@ -91,16 +85,22 @@ export function play(type: 'noteMy' | 'note' | 'antenna' | 'channel' | 'notifica } export async function playFile(file: string, volume: number) { + const buffer = await loadAudio(file); + createSourceNode(buffer, volume)?.start(); +} + +export function createSourceNode(buffer: AudioBuffer, volume: number) : AudioBufferSourceNode | null { const masterVolume = defaultStore.state.sound_masterVolume; if (masterVolume === 0 || volume === 0) { - return; + return null; } const gainNode = ctx.createGain(); gainNode.gain.value = masterVolume * volume; const soundSource = ctx.createBufferSource(); - soundSource.buffer = await getAudio(file); + soundSource.buffer = buffer; soundSource.connect(gainNode).connect(ctx.destination); - soundSource.start(); + + return soundSource; } diff --git a/packages/frontend/src/widgets/WidgetJobQueue.vue b/packages/frontend/src/widgets/WidgetJobQueue.vue index 89770b2216d5..fa829975700f 100644 --- a/packages/frontend/src/widgets/WidgetJobQueue.vue +++ b/packages/frontend/src/widgets/WidgetJobQueue.vue @@ -99,7 +99,10 @@ const current = reactive({ }, }); const prev = reactive({} as typeof current); -const jammedSound = sound.setVolume(sound.getAudio('syuilo/queue-jammed'), 1); +let jammedAudioBuffer: AudioBuffer | null = $ref(null); +let jammedSoundNodePlaying: boolean = $ref(false); + +sound.loadAudio('syuilo/queue-jammed').then(buf => jammedAudioBuffer = buf); for (const domain of ['inbox', 'deliver']) { prev[domain] = deepClone(current[domain]); @@ -113,8 +116,13 @@ const onStats = (stats) => { current[domain].waiting = stats[domain].waiting; current[domain].delayed = stats[domain].delayed; - if (current[domain].waiting > 0 && widgetProps.sound && jammedSound.paused) { - jammedSound.play(); + if (current[domain].waiting > 0 && widgetProps.sound && jammedAudioBuffer && !jammedSoundNodePlaying) { + const soundNode = sound.createSourceNode(jammedAudioBuffer, 1); + if (soundNode) { + jammedSoundNodePlaying = true; + soundNode.onended = () => jammedSoundNodePlaying = false; + soundNode.start(); + } } } }; From 18bdec9641b77e9b15e57e50c5fd688881cf2b80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9A=90=E6=9C=88=E3=81=AA=E3=81=B5=20=28Nafu=20Satsuki?= =?UTF-8?q?=29?= Date: Wed, 22 Nov 2023 10:13:46 +0900 Subject: [PATCH 078/296] =?UTF-8?q?fix:=20verifymail.io=20API=E3=81=AE?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E9=A0=85=E7=9B=AE=E3=81=8C=E5=8F=8D=E6=98=A0?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84=20(#12399)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/src/server/api/endpoints/admin/meta.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/backend/src/server/api/endpoints/admin/meta.ts b/packages/backend/src/server/api/endpoints/admin/meta.ts index cc9afaf7fd1e..1dddb166ae6f 100644 --- a/packages/backend/src/server/api/endpoints/admin/meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/meta.ts @@ -267,6 +267,14 @@ export const meta = { type: 'boolean', optional: false, nullable: false, }, + enableVerifymailApi: { + type: 'boolean', + optional: false, nullable: false, + }, + verifymailAuthKey: { + type: 'string', + optional: false, nullable: true, + }, enableChartsForRemoteUser: { type: 'boolean', optional: false, nullable: false, @@ -421,6 +429,8 @@ export default class extends Endpoint { // eslint- deeplIsPro: instance.deeplIsPro, enableIpLogging: instance.enableIpLogging, enableActiveEmailValidation: instance.enableActiveEmailValidation, + enableVerifymailApi: instance.enableVerifymailApi, + verifymailAuthKey: instance.verifymailAuthKey, enableChartsForRemoteUser: instance.enableChartsForRemoteUser, enableChartsForFederatedInstances: instance.enableChartsForFederatedInstances, enableServerMachineStats: instance.enableServerMachineStats, From c6ed06d783a2d49ca029cdf5284150bbfd3c9976 Mon Sep 17 00:00:00 2001 From: "y.takahashi" Date: Wed, 22 Nov 2023 10:19:30 +0900 Subject: [PATCH 079/296] =?UTF-8?q?twitter=E5=9F=8B=E3=82=81=E8=BE=BC?= =?UTF-8?q?=E3=81=BF=E3=81=AEsandbox=E5=B1=9E=E6=80=A7=E3=81=ABallow-popup?= =?UTF-8?q?s-to-escape-sandbox=E3=82=92=E8=BF=BD=E5=8A=A0=20(#12400)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: unarist --- packages/frontend/src/components/MkUrlPreview.vue | 2 +- packages/frontend/test/url-preview.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/components/MkUrlPreview.vue b/packages/frontend/src/components/MkUrlPreview.vue index e2844f8fa1df..a460f3ea07b2 100644 --- a/packages/frontend/src/components/MkUrlPreview.vue +++ b/packages/frontend/src/components/MkUrlPreview.vue @@ -31,7 +31,7 @@ SPDX-License-Identifier: AGPL-3.0-only