From b4dd61a016da2fca9e552c2de0404b5166f40817 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 30 Oct 2023 17:31:49 +0900 Subject: [PATCH 1/8] Update .eslintrc.js --- packages/shared/.eslintrc.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/shared/.eslintrc.js b/packages/shared/.eslintrc.js index 3f19aad685..09b4ba726f 100644 --- a/packages/shared/.eslintrc.js +++ b/packages/shared/.eslintrc.js @@ -72,6 +72,13 @@ module.exports = { { 'blankLine': 'always', 'prev': 'function', 'next': '*' }, { 'blankLine': 'always', 'prev': '*', 'next': 'function' }, ], + 'lines-between-class-members': ['error', { + enforce: [{ + blankLine: 'always', + prev: 'method', + next: '*', + }] + }], '@typescript-eslint/func-call-spacing': ['error', 'never'], '@typescript-eslint/no-explicit-any': ['warn'], '@typescript-eslint/no-unused-vars': ['warn'], From d45b2dd3a730de9dca272a57fc23bab43444ac8c Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 30 Oct 2023 17:36:32 +0900 Subject: [PATCH 2/8] lint fix --- packages/backend/src/server/api/stream/channel.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/backend/src/server/api/stream/channel.ts b/packages/backend/src/server/api/stream/channel.ts index ad32d08fee..3aa0d69c0b 100644 --- a/packages/backend/src/server/api/stream/channel.ts +++ b/packages/backend/src/server/api/stream/channel.ts @@ -67,6 +67,8 @@ export default abstract class Channel { } public abstract init(params: any): void; + public dispose?(): void; + public onMessage?(type: string, body: any): void; } From 359f3d5ef53afe611fa61babd17d5662f0a417ea Mon Sep 17 00:00:00 2001 From: Shun Sakai Date: Mon, 30 Oct 2023 19:35:10 +0900 Subject: [PATCH 3/8] chore: Convert issue templates to YAML (#12194) --- .github/ISSUE_TEMPLATE/01_bug-report.md | 60 ------------ .github/ISSUE_TEMPLATE/01_bug-report.yml | 91 +++++++++++++++++++ .github/ISSUE_TEMPLATE/02_feature-request.md | 12 --- .github/ISSUE_TEMPLATE/02_feature-request.yml | 11 +++ 4 files changed, 102 insertions(+), 72 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/01_bug-report.md create mode 100644 .github/ISSUE_TEMPLATE/01_bug-report.yml delete mode 100644 .github/ISSUE_TEMPLATE/02_feature-request.md create mode 100644 .github/ISSUE_TEMPLATE/02_feature-request.yml diff --git a/.github/ISSUE_TEMPLATE/01_bug-report.md b/.github/ISSUE_TEMPLATE/01_bug-report.md deleted file mode 100644 index b889d96eb3..0000000000 --- a/.github/ISSUE_TEMPLATE/01_bug-report.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -name: 🐛 Bug Report -about: Create a report to help us improve -title: '' -labels: ⚠️bug? -assignees: '' - ---- - - - -## 💡 Summary - - - -## 🥰 Expected Behavior - - - -## 🤬 Actual Behavior - - - -## 📝 Steps to Reproduce - -1. -2. -3. - -## 📌 Environment - - - - -### 💻 Frontend -* Model and OS of the device(s): - -* Browser: - -* Server URL: - -* Misskey: - 13.x.x - -### 🛰 Backend (for server admin) - - -* Installation Method or Hosting Service: -* Misskey: 13.x.x -* Node: 20.x.x -* PostgreSQL: 15.x.x -* Redis: 7.x.x -* OS and Architecture: diff --git a/.github/ISSUE_TEMPLATE/01_bug-report.yml b/.github/ISSUE_TEMPLATE/01_bug-report.yml new file mode 100644 index 0000000000..f74719989f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/01_bug-report.yml @@ -0,0 +1,91 @@ +name: 🐛 Bug Report +description: Create a report to help us improve +labels: ["⚠️bug?"] + +body: + - type: markdown + attributes: + value: | + Thanks for reporting! + First, in order to avoid duplicate Issues, please search to see if the problem you found has already been reported. + Also, If you are NOT owner/admin of server, PLEASE DONT REPORT SERVER SPECIFIC ISSUES TO HERE! (e.g. feature XXX is not working in misskey.example) Please try with another misskey servers, and if your issue is only reproducible with specific server, contact your server's owner/admin first. + + - type: textarea + attributes: + label: 💡 Summary + description: Tell us what the bug is + validations: + required: true + + - type: textarea + attributes: + label: 🥰 Expected Behavior + description: Tell us what should happen + validations: + required: true + + - type: textarea + attributes: + label: 🤬 Actual Behavior + description: | + Tell us what happens instead of the expected behavior. + Please include errors from the developer console and/or server log files if you have access to them. + validations: + required: true + + - type: textarea + attributes: + label: 📝 Steps to Reproduce + placeholder: | + 1. + 2. + 3. + validations: + required: false + + - type: textarea + attributes: + label: 💻 Frontend Environment + description: | + Tell us where on the platform it happens + DO NOT WRITE "latest". Please provide the specific version. + + Examples: + * Model and OS of the device(s): MacBook Pro (14inch, 2021), macOS Ventura 13.4 + * Browser: Chrome 113.0.5672.126 + * Server URL: misskey.io + * Misskey: 13.x.x + value: | + * Model and OS of the device(s): + * Browser: + * Server URL: + * Misskey: + render: markdown + validations: + required: false + + - type: textarea + attributes: + label: 🛰 Backend Environment (for server admin) + description: | + Tell us where on the platform it happens + DO NOT WRITE "latest". Please provide the specific version. + If you are using a managed service, put that after the version. + + Examples: + * Installation Method or Hosting Service: docker compose, k8s/docker, systemd, "Misskey install shell script", development environment + * Misskey: 13.x.x + * Node: 20.x.x + * PostgreSQL: 15.x.x + * Redis: 7.x.x + * OS and Architecture: Ubuntu 22.04.2 LTS aarch64 + value: | + * Installation Method or Hosting Service: + * Misskey: + * Node: + * PostgreSQL: + * Redis: + * OS and Architecture: + render: markdown + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/02_feature-request.md b/.github/ISSUE_TEMPLATE/02_feature-request.md deleted file mode 100644 index 5045b17712..0000000000 --- a/.github/ISSUE_TEMPLATE/02_feature-request.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -name: ✨ Feature Request -about: Suggest an idea for this project -title: '' -labels: ✨Feature -assignees: '' - ---- - -## Summary - - diff --git a/.github/ISSUE_TEMPLATE/02_feature-request.yml b/.github/ISSUE_TEMPLATE/02_feature-request.yml new file mode 100644 index 0000000000..17926412ff --- /dev/null +++ b/.github/ISSUE_TEMPLATE/02_feature-request.yml @@ -0,0 +1,11 @@ +name: ✨ Feature Request +description: Suggest an idea for this project +labels: ["✨Feature"] + +body: + - type: textarea + attributes: + label: Summary + description: Tell us what the suggestion is + validations: + required: true From 4eab3c07fd599598e56d43b1790f930cda681224 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 30 Oct 2023 19:38:27 +0900 Subject: [PATCH 4/8] lint fixes --- packages/frontend/src/scripts/worker-multi-dispatch.ts | 2 ++ packages/shared/.eslintrc.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/scripts/worker-multi-dispatch.ts b/packages/frontend/src/scripts/worker-multi-dispatch.ts index 1d184e99a1..7686b687c5 100644 --- a/packages/frontend/src/scripts/worker-multi-dispatch.ts +++ b/packages/frontend/src/scripts/worker-multi-dispatch.ts @@ -71,9 +71,11 @@ export class WorkerMultiDispatch { public isTerminated() { return this.terminated; } + public getWorkers() { return this.workers; } + public getSymbol() { return this.symbol; } diff --git a/packages/shared/.eslintrc.js b/packages/shared/.eslintrc.js index 09b4ba726f..3deaffb296 100644 --- a/packages/shared/.eslintrc.js +++ b/packages/shared/.eslintrc.js @@ -72,7 +72,8 @@ module.exports = { { 'blankLine': 'always', 'prev': 'function', 'next': '*' }, { 'blankLine': 'always', 'prev': '*', 'next': 'function' }, ], - 'lines-between-class-members': ['error', { + "lines-between-class-members": "off", + '@typescript-eslint/lines-between-class-members': ['error', { enforce: [{ blankLine: 'always', prev: 'method', From 56c5da97e65412ff6b3f5f352221683d70e5ac94 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 30 Oct 2023 20:07:51 +0900 Subject: [PATCH 5/8] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66b2e0ae4f..a9e435a6af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ - Enhance: プラグインを削除した際には、使用されていたアクセストークンも同時に削除されるようになりました - Enhance: プラグインで`Plugin:register_note_view_interruptor`を用いてnoteの代わりにnullを返却することでノートを非表示にできるようになりました - Enhance: AiScript関数`Mk:nyaize()`が追加されました +- Enhance: その他細かなブラッシュアップ - Fix: 投稿フォームでのユーザー変更がプレビューに反映されない問題を修正 - Fix: ユーザーページの ノート > ファイル付き タブにリプライが表示されてしまう - Fix: 「検索」MFMにおいて一部の検索キーワードが正しく認識されない問題を修正 @@ -47,7 +48,7 @@ - Fix: 標準テーマと同じIDを使用してインストールできてしまう問題を修正 ### Server -- Enhance: RedisへのTLのキャッシュをオフにできるように +- Enhance: RedisへのTLのキャッシュ(FTT)をオフにできるように - Enhance: フォローしているチャンネルをフォロー解除した時(またはその逆)、タイムラインに反映される間隔を改善 - Enhance: プロフィールの自己紹介欄のMFMが連合するようになりました - 相手がMisskey v2023.11.0以降である必要があります From a35fe29ef409887477f897630d471ed8e9f559ef Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 31 Oct 2023 11:45:03 +0900 Subject: [PATCH 6/8] =?UTF-8?q?fix(backend):=20=E3=82=A2=E3=82=AF=E3=82=BB?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=83=BC=E3=82=AF=E3=83=B3=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4=E3=81=99=E3=82=8B=E3=81=A8=E3=80=81=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E3=81=8C=E5=8F=96=E5=BE=97=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=8F?= =?UTF-8?q?=E3=81=AA=E3=82=8B=E5=A0=B4=E5=90=88=E3=81=8C=E3=81=82=E3=82=8B?= =?UTF-8?q?=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + .../src/core/entities/NotificationEntityService.ts | 10 +++------- .../src/server/api/endpoints/notifications/create.ts | 4 ++-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9e435a6af..cbda1f194a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,6 +60,7 @@ - Fix: `hashtags/trend`にてRedisからトレンドの情報が取得できない際にInternal Server Errorになる問題を修正 - Fix: HTLをリロードまたは遡行したとき、フォローしているチャンネルのノートが含まれない問題を修正 #11765 #12181 - Fix: リノートをリノートできるのを修正 +- Fix: アクセストークンを削除すると、通知が取得できなくなる場合がある問題を修正 ## 2023.10.2 diff --git a/packages/backend/src/core/entities/NotificationEntityService.ts b/packages/backend/src/core/entities/NotificationEntityService.ts index 3ee7c91f3a..9542815bd7 100644 --- a/packages/backend/src/core/entities/NotificationEntityService.ts +++ b/packages/backend/src/core/entities/NotificationEntityService.ts @@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common'; import { ModuleRef } from '@nestjs/core'; import { In } from 'typeorm'; import { DI } from '@/di-symbols.js'; -import type { AccessTokensRepository, FollowRequestsRepository, NotesRepository, MiUser, UsersRepository } from '@/models/_.js'; +import type { FollowRequestsRepository, NotesRepository, MiUser, UsersRepository } from '@/models/_.js'; import { awaitAll } from '@/misc/prelude/await-all.js'; import type { MiNotification } from '@/models/Notification.js'; import type { MiNote } from '@/models/Note.js'; @@ -40,9 +40,6 @@ export class NotificationEntityService implements OnModuleInit { @Inject(DI.followRequestsRepository) private followRequestsRepository: FollowRequestsRepository, - @Inject(DI.accessTokensRepository) - private accessTokensRepository: AccessTokensRepository, - //private userEntityService: UserEntityService, //private noteEntityService: NoteEntityService, //private customEmojiService: CustomEmojiService, @@ -69,7 +66,6 @@ export class NotificationEntityService implements OnModuleInit { }, ): Promise> { const notification = src; - const token = notification.appAccessTokenId ? await this.accessTokensRepository.findOneByOrFail({ id: notification.appAccessTokenId }) : null; const noteIfNeed = NOTE_REQUIRED_NOTIFICATION_TYPES.has(notification.type) && notification.noteId != null ? ( hint?.packedNotes != null ? hint.packedNotes.get(notification.noteId) @@ -100,8 +96,8 @@ export class NotificationEntityService implements OnModuleInit { } : {}), ...(notification.type === 'app' ? { body: notification.customBody, - header: notification.customHeader ?? token?.name, - icon: notification.customIcon ?? token?.iconUrl, + header: notification.customHeader, + icon: notification.customIcon, } : {}), }); } diff --git a/packages/backend/src/server/api/endpoints/notifications/create.ts b/packages/backend/src/server/api/endpoints/notifications/create.ts index 268628cf76..19bc6fa8d7 100644 --- a/packages/backend/src/server/api/endpoints/notifications/create.ts +++ b/packages/backend/src/server/api/endpoints/notifications/create.ts @@ -42,8 +42,8 @@ export default class extends Endpoint { // eslint- this.notificationService.createNotification(user.id, 'app', { appAccessTokenId: token ? token.id : null, customBody: ps.body, - customHeader: ps.header, - customIcon: ps.icon, + customHeader: ps.header ?? token?.name, + customIcon: ps.icon ?? token?.iconUrl, }); }); } From e6e5bf1da4198e3d2c19b02ede3a6777c37e1c7e Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 31 Oct 2023 13:46:58 +0900 Subject: [PATCH 7/8] :art: --- .../src/components/global/MkFooterSpacer.vue | 32 +++++++++++++++++++ packages/frontend/src/components/index.ts | 7 ++-- .../frontend/src/pages/settings/index.vue | 1 + 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 packages/frontend/src/components/global/MkFooterSpacer.vue diff --git a/packages/frontend/src/components/global/MkFooterSpacer.vue b/packages/frontend/src/components/global/MkFooterSpacer.vue new file mode 100644 index 0000000000..07df76b256 --- /dev/null +++ b/packages/frontend/src/components/global/MkFooterSpacer.vue @@ -0,0 +1,32 @@ + + + + + + + diff --git a/packages/frontend/src/components/index.ts b/packages/frontend/src/components/index.ts index 48af4754d7..c740d181f9 100644 --- a/packages/frontend/src/components/index.ts +++ b/packages/frontend/src/components/index.ts @@ -5,7 +5,7 @@ import { App } from 'vue'; -import Mfm from './global/MkMisskeyFlavoredMarkdown.ts'; +import Mfm from './global/MkMisskeyFlavoredMarkdown.js'; import MkA from './global/MkA.vue'; import MkAcct from './global/MkAcct.vue'; import MkAvatar from './global/MkAvatar.vue'; @@ -16,13 +16,14 @@ import MkUserName from './global/MkUserName.vue'; import MkEllipsis from './global/MkEllipsis.vue'; import MkTime from './global/MkTime.vue'; import MkUrl from './global/MkUrl.vue'; -import I18n from './global/i18n'; +import I18n from './global/i18n.js'; import RouterView from './global/RouterView.vue'; import MkLoading from './global/MkLoading.vue'; import MkError from './global/MkError.vue'; import MkAd from './global/MkAd.vue'; import MkPageHeader from './global/MkPageHeader.vue'; import MkSpacer from './global/MkSpacer.vue'; +import MkFooterSpacer from './global/MkFooterSpacer.vue'; import MkStickyContainer from './global/MkStickyContainer.vue'; export default function(app: App) { @@ -50,6 +51,7 @@ export const components = { MkAd: MkAd, MkPageHeader: MkPageHeader, MkSpacer: MkSpacer, + MkFooterSpacer: MkFooterSpacer, MkStickyContainer: MkStickyContainer, }; @@ -73,6 +75,7 @@ declare module '@vue/runtime-core' { MkAd: typeof MkAd; MkPageHeader: typeof MkPageHeader; MkSpacer: typeof MkSpacer; + MkFooterSpacer: typeof MkFooterSpacer; MkStickyContainer: typeof MkStickyContainer; } } diff --git a/packages/frontend/src/pages/settings/index.vue b/packages/frontend/src/pages/settings/index.vue index cfabbbbf65..361a6c8c78 100644 --- a/packages/frontend/src/pages/settings/index.vue +++ b/packages/frontend/src/pages/settings/index.vue @@ -23,6 +23,7 @@ SPDX-License-Identifier: AGPL-3.0-only + From 7c692283add6c8ee9db4e5b95f905d23ad45bf7f Mon Sep 17 00:00:00 2001 From: _ Date: Tue, 31 Oct 2023 15:27:20 +0900 Subject: [PATCH 8/8] =?UTF-8?q?fix(backend):=20=E8=87=AA=E8=BA=AB=E3=81=AE?= =?UTF-8?q?=E5=AE=9B=E5=85=88=E3=81=AA=E3=81=97=E3=83=80=E3=82=A4=E3=83=AC?= =?UTF-8?q?=E3=82=AF=E3=83=88=E6=8A=95=E7=A8=BF=E3=81=8C=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=83=AA=E3=83=BC=E3=83=9F=E3=83=B3=E3=82=B0=E3=81=A7=E6=B5=81?= =?UTF-8?q?=E3=82=8C=E3=81=A6=E3=81=93=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3=20(#12203)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: dm stream * add CHANGELOG --- CHANGELOG.md | 1 + .../backend/src/server/api/stream/channels/home-timeline.ts | 2 +- .../backend/src/server/api/stream/channels/hybrid-timeline.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbda1f194a..51b96831fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ - Fix: HTLをリロードまたは遡行したとき、フォローしているチャンネルのノートが含まれない問題を修正 #11765 #12181 - Fix: リノートをリノートできるのを修正 - Fix: アクセストークンを削除すると、通知が取得できなくなる場合がある問題を修正 +- Fix: 自身の宛先なしダイレクト投稿がストリーミングで流れてこない問題を修正 ## 2023.10.2 diff --git a/packages/backend/src/server/api/stream/channels/home-timeline.ts b/packages/backend/src/server/api/stream/channels/home-timeline.ts index 1c882c8d8a..80054d0881 100644 --- a/packages/backend/src/server/api/stream/channels/home-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/home-timeline.ts @@ -56,7 +56,7 @@ class HomeTimelineChannel extends Channel { if (note.visibility === 'followers') { if (!isMe && !Object.hasOwn(this.following, note.userId)) return; } else if (note.visibility === 'specified') { - if (!note.visibleUserIds!.includes(this.user!.id)) return; + if (!isMe && !note.visibleUserIds!.includes(this.user!.id)) return; } if (note.reply) { diff --git a/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts b/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts index aa3fc75092..78645982bf 100644 --- a/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts @@ -67,7 +67,7 @@ class HybridTimelineChannel extends Channel { if (note.visibility === 'followers') { if (!isMe && !Object.hasOwn(this.following, note.userId)) return; } else if (note.visibility === 'specified') { - if (!note.visibleUserIds!.includes(this.user!.id)) return; + if (!isMe && !note.visibleUserIds!.includes(this.user!.id)) return; } // Ignore notes from instances the user has muted