From b45f18cd14ce71283805b667b124d3ebd6fc11e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?= <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Mon, 27 Apr 2026 10:26:13 +0900 Subject: [PATCH 1/3] =?UTF-8?q?fix(backend):=20=E3=83=8E=E3=83=BC=E3=83=88?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E3=81=A7=E5=85=AC=E9=96=8B=E7=AF=84=E5=9B=B2?= =?UTF-8?q?=E3=82=92=E8=80=83=E6=85=AE=E3=81=99=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=20(#17335)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(backend): ノート通知で公開範囲を考慮するように * refactor: remove unused imports * Update Changelog * Update Changelog * fix: フォロワー限定ノートは通知 --------- Co-authored-by: lqvp <183242690+lqvp@users.noreply.github.com> --- CHANGELOG.md | 2 + .../backend/src/core/NoteCreateService.ts | 43 ++++++++++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9447fc10b..26b0258121 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,8 @@ (Cherry-picked from https://github.com/lqvp/misskey-tempura/commit/3f0f4bfe923f2b3a7837017b54841598f421c6ef) - Fix: support activity with `actor` as an id string or embedded object in inbox processor and ActivityPub inbox service - Fix: コンフィグファイルに `meilisearch` の設定がある状態でほかの検索プロバイダを利用すると、UI上からリモートのノートの検索ができない問題を修正 +- Fix: ノートに関する通知で公開範囲が考慮されていない問題を修正 + (Cherry-picked from https://github.com/lqvp/misskey-tempura/commit/cbce96c520a138b8bcd16890ff6f2952830fa166 originally presented in https://github.com/yojo-art/cherrypick/pull/743) ## 2026.3.2 diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 748f2cbad9..2982cc0dd0 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -71,6 +71,7 @@ class NotificationManager { constructor( private mutingsRepository: MutingsRepository, private notificationService: NotificationService, + private followingsRepository: FollowingsRepository, notifier: { id: MiUser['id']; }, note: MiNote, ) { @@ -101,7 +102,47 @@ class NotificationManager { @bindThis public async notify() { + if (this.queue.length === 0) { + return; + } + + const targetUserIds = this.queue.map(x => x.target); + let visibleUserIds: Set; + + switch (this.note.visibility) { + case 'public': + case 'home': + visibleUserIds = new Set(targetUserIds); + break; + + case 'specified': + visibleUserIds = new Set(this.note.visibleUserIds.filter(id => targetUserIds.includes(id))); + break; + + // TODO: フォロワー限定ノートにフォロワーではない人がメンションされた場合通知されるのが正しい挙動なのか確認(一部に挙動の不一致がありそう)。現状は通知されるためフィルタしない + // case 'followers': { + // const followers = await this.followingsRepository.find({ + // where: { + // followeeId: this.note.userId, + // followerId: In(targetUserIds), + // isFollowerHibernated: false, + // }, + // select: ['followerId'], + // }); + // visibleUserIds = new Set(followers.map(f => f.followerId)); + // break; + // } + + default: + visibleUserIds = new Set(); + break; + } + for (const x of this.queue) { + if (!visibleUserIds.has(x.target)) { + continue; + } + if (x.reason === 'renote') { this.notificationService.createNotification(x.target, 'renote', { noteId: this.note.id, @@ -772,7 +813,7 @@ export class NoteCreateService implements OnApplicationShutdown { this.webhookService.enqueueUserWebhook(user.id, 'note', { note: noteObj }); - const nm = new NotificationManager(this.mutingsRepository, this.notificationService, user, note); + const nm = new NotificationManager(this.mutingsRepository, this.notificationService, this.followingsRepository, user, note); await this.createMentionedEvents(mentionedUsers, note, nm); From 21f51be5b717b10a8786f8b9d28dcf3e0392d7b3 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 27 Apr 2026 10:31:02 +0900 Subject: [PATCH 2/3] fix: redirect beta/alpha/rc "what's new" button to GitHub releases page (#17347) * Initial plan * fix: redirect beta/alpha/rc update info button to GitHub releases page Agent-Logs-Url: https://github.com/misskey-dev/misskey/sessions/4ac22dd9-13dd-4ef2-a6f7-d68cfda4a19f Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com> --- packages/frontend/src/components/MkUpdated.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/components/MkUpdated.vue b/packages/frontend/src/components/MkUpdated.vue index 09cf595eab..eea64b6c26 100644 --- a/packages/frontend/src/components/MkUpdated.vue +++ b/packages/frontend/src/components/MkUpdated.vue @@ -34,7 +34,11 @@ const isBeta = version.includes('-beta') || version.includes('-alpha') || versio function whatIsNew() { modal.value?.close(); - window.open(`https://misskey-hub.net/docs/releases/#_${version.replace(/\./g, '')}`, '_blank'); + if (isBeta) { + window.open(`https://github.com/misskey-dev/misskey/releases/tag/${version}`, '_blank'); + } else { + window.open(`https://misskey-hub.net/docs/releases/#_${version.replace(/\./g, '')}`, '_blank'); + } } onMounted(() => { From 7bfd85cdba6846613977198ec800b08179ab7fd5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 27 Apr 2026 01:33:17 +0000 Subject: [PATCH 3/3] Bump version to 2026.4.0-beta.1 --- package.json | 2 +- packages/misskey-js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1d372fb045..4c304236c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "2026.4.0-beta.0", + "version": "2026.4.0-beta.1", "codename": "nasubi", "repository": { "type": "git", diff --git a/packages/misskey-js/package.json b/packages/misskey-js/package.json index fad8adcd11..59027c72e8 100644 --- a/packages/misskey-js/package.json +++ b/packages/misskey-js/package.json @@ -1,7 +1,7 @@ { "type": "module", "name": "misskey-js", - "version": "2026.4.0-beta.0", + "version": "2026.4.0-beta.1", "description": "Misskey SDK for JavaScript", "license": "MIT", "main": "./built/index.js",