From 19807c837303ece648ed43ccfbd54e36e15eefb5 Mon Sep 17 00:00:00 2001 From: icalo35 Date: Tue, 25 Jul 2023 03:40:54 +0900 Subject: [PATCH 01/15] =?UTF-8?q?UID,GID=E3=82=92=E7=92=B0=E5=A2=83?= =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=AE=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=81=8B=E3=82=89=E8=A8=AD=E5=AE=9A=E3=81=99=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index fb389659bc9..4acc6dcef1d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,8 +57,11 @@ RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \ FROM --platform=$TARGETPLATFORM node:${NODE_VERSION}-slim AS runner -ARG UID="991" -ARG GID="991" +ARG UID_H +ARG GID_H + +ARG UID=${UID_H} +ARG GID=${GID_H} RUN apt-get update \ && apt-get install -y --no-install-recommends \ From f3505a3f914578ea91f7e971a4d81aff2f4fb886 Mon Sep 17 00:00:00 2001 From: icalo35 Date: Sun, 8 Oct 2023 04:15:14 +0900 Subject: [PATCH 02/15] =?UTF-8?q?Clip=E3=81=B8=E3=81=AE=E3=83=8E=E3=83=BC?= =?UTF-8?q?=E3=83=88=E8=BF=BD=E5=8A=A0=E5=9B=9E=E6=95=B0=E5=88=B6=E9=99=90?= =?UTF-8?q?=E3=82=92=E5=A4=A7=E5=B9=85=E3=81=AB=E7=B7=A9=E5=92=8C(20/1hour?= =?UTF-8?q?=20=E2=86=92=20100/1hour)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/server/api/endpoints/clips/add-note.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/endpoints/clips/add-note.ts b/packages/backend/src/server/api/endpoints/clips/add-note.ts index 749593aa656..ad5c10c1a03 100644 --- a/packages/backend/src/server/api/endpoints/clips/add-note.ts +++ b/packages/backend/src/server/api/endpoints/clips/add-note.ts @@ -20,7 +20,7 @@ export const meta = { limit: { duration: ms('1hour'), - max: 20, + max: 100, }, errors: { From f7959073ecd7a16a764fbfcc3297bcd9c1e407c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BE=E3=81=A3=E3=81=A1=E3=82=83=E3=81=A8=E3=83=BC?= =?UTF-8?q?=E3=81=AB=E3=82=85?= <17376330+u1-liquid@users.noreply.github.com> Date: Sun, 18 Feb 2024 03:47:17 +0900 Subject: [PATCH 03/15] =?UTF-8?q?spec(backend/NoteCreateService):=20?= =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=82=AB=E3=83=AB=E3=83=A6=E3=83=BC=E3=82=B6?= =?UTF-8?q?=E3=83=BC=E3=81=8C=E3=81=BE=E3=81=A0=E8=AA=B0=E3=82=82=E3=83=95?= =?UTF-8?q?=E3=82=A9=E3=83=AD=E3=83=BC=E3=81=97=E3=81=A6=E3=81=84=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=83=AA=E3=83=A2=E3=83=BC=E3=83=88=E3=83=A6=E3=83=BC?= =?UTF-8?q?=E3=82=B6=E3=83=BC=E3=81=AB=E3=82=88=E3=82=8B=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E3=82=92=E5=BC=95=E3=81=8D=E8=B5=B7=E3=81=93=E3=81=99=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E6=80=A7=E3=81=AE=E3=81=82=E3=82=8B=E6=8A=95=E7=A8=BF?= =?UTF-8?q?=E3=82=92=E6=8B=92=E5=90=A6=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=20(MisskeyIO#462)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cherry-picked from 738b4d69701a9d4b232f6a44b340782d096b182b, 1b3adcc2bbc695a0f28f5865a6705e0e59830962, 33cb50761ec12fc0df0e6f99ba97e0d5d4e580fc, a27af00e23a5283e357de1e6bf2a47ebefaa77c2, 5c6236bb0f1fde9140e331c9e1390bb5fccd4f9a Co-authored-by: Ebise Lutica <7106976+EbiseLutica@users.noreply.github.com> --- packages/backend/src/core/NoteCreateService.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 9cec614d5c8..85b3caa5600 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -359,6 +359,16 @@ export class NoteCreateService implements OnApplicationShutdown { mentionedUsers = data.apMentions ?? await this.extractMentionedUsers(user, combinedTokens); } + const willCauseNotification = mentionedUsers.filter(u => u.host === null).length > 0 || data.reply?.userHost === null || data.renote?.userHost === null; + + if (process.env.MISSKEY_BLOCK_MENTIONS_FROM_UNFAMILIAR_REMOTE_USERS === 'true' && user.host !== null && willCauseNotification) { + const userEntity = await this.usersRepository.findOneBy({ id: user.id }); + if ((userEntity?.followersCount ?? 0) === 0) { + this.logger.error('Request rejected because user has no local followers', { user: user.id, note: data }); + throw new IdentifiableError('e11b3a16-f543-4885-8eb1-66cad131dbfd', 'Notes including mentions, replies, or renotes from remote users are not allowed until user has at least one local follower.'); + } + } + tags = tags.filter(tag => Array.from(tag).length <= 128).splice(0, 32); if (data.reply && (user.id !== data.reply.userId) && !mentionedUsers.some(u => u.id === data.reply!.userId)) { From 98ded2e4d1a17aa00d9ddd476953108dc17ae5e6 Mon Sep 17 00:00:00 2001 From: na2na-p Date: Sun, 18 Feb 2024 11:51:08 +0900 Subject: [PATCH 04/15] =?UTF-8?q?=E3=83=AD=E3=82=AE=E3=83=B3=E3=82=B0?= =?UTF-8?q?=E5=91=A8=E3=82=8A=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/NoteCreateService.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 85b3caa5600..baf855e8740 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -364,8 +364,7 @@ export class NoteCreateService implements OnApplicationShutdown { if (process.env.MISSKEY_BLOCK_MENTIONS_FROM_UNFAMILIAR_REMOTE_USERS === 'true' && user.host !== null && willCauseNotification) { const userEntity = await this.usersRepository.findOneBy({ id: user.id }); if ((userEntity?.followersCount ?? 0) === 0) { - this.logger.error('Request rejected because user has no local followers', { user: user.id, note: data }); - throw new IdentifiableError('e11b3a16-f543-4885-8eb1-66cad131dbfd', 'Notes including mentions, replies, or renotes from remote users are not allowed until user has at least one local follower.'); + throw new Error('Temporarily, notes including mentions, replies and renotes to local-user from remote users which is not followed by local-users are not allowed'); } } From 54eb28c38d30f9e59aa80279507f71e203849838 Mon Sep 17 00:00:00 2001 From: na2na-p Date: Sun, 18 Feb 2024 11:57:30 +0900 Subject: [PATCH 05/15] =?UTF-8?q?=E5=BC=BE=E3=81=8F=E5=BC=BE=E3=81=8B?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=81=AE=E6=8C=99=E5=8B=95=E6=B1=BA=E5=AE=9A?= =?UTF-8?q?=E3=82=92default.yml=E3=81=AB=E3=82=84=E3=82=89=E3=81=9B?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/example.yml | 4 ++++ packages/backend/src/config.ts | 3 +++ packages/backend/src/core/NoteCreateService.ts | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.config/example.yml b/.config/example.yml index 7fea9293746..d784fb54616 100644 --- a/.config/example.yml +++ b/.config/example.yml @@ -282,3 +282,7 @@ signToActivityPubGet: true # PID File of master process #pidFile: /tmp/misskey.pid + +# ローカル宛てのメンション、リプライ、引用ノートの発行元が、ローカルユーザーにフォローされていない場合に投稿を拒否するかどうか +# default: false +# misskeyBlockMentionsFromUnfamiliarRemoteUsers: false diff --git a/packages/backend/src/config.ts b/packages/backend/src/config.ts index 0ca1fa55c1f..40249767162 100644 --- a/packages/backend/src/config.ts +++ b/packages/backend/src/config.ts @@ -93,6 +93,7 @@ type Source = { perUserNotificationsMaxCount?: number; deactivateAntennaThreshold?: number; pidFile: string; + misskeyBlockMentionsFromUnfamiliarRemoteUsers?: boolean; }; export type Config = { @@ -170,6 +171,7 @@ export type Config = { perUserNotificationsMaxCount: number; deactivateAntennaThreshold: number; pidFile: string; + misskeyBlockMentionsFromUnfamiliarRemoteUsers: boolean; }; const _filename = fileURLToPath(import.meta.url); @@ -265,6 +267,7 @@ export function loadConfig(): Config { perUserNotificationsMaxCount: config.perUserNotificationsMaxCount ?? 500, deactivateAntennaThreshold: config.deactivateAntennaThreshold ?? (1000 * 60 * 60 * 24 * 7), pidFile: config.pidFile, + misskeyBlockMentionsFromUnfamiliarRemoteUsers: config.misskeyBlockMentionsFromUnfamiliarRemoteUsers ?? false, }; } diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index baf855e8740..fc71b360669 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -361,7 +361,7 @@ export class NoteCreateService implements OnApplicationShutdown { const willCauseNotification = mentionedUsers.filter(u => u.host === null).length > 0 || data.reply?.userHost === null || data.renote?.userHost === null; - if (process.env.MISSKEY_BLOCK_MENTIONS_FROM_UNFAMILIAR_REMOTE_USERS === 'true' && user.host !== null && willCauseNotification) { + if (this.config.misskeyBlockMentionsFromUnfamiliarRemoteUsers === true && user.host !== null && willCauseNotification) { const userEntity = await this.usersRepository.findOneBy({ id: user.id }); if ((userEntity?.followersCount ?? 0) === 0) { throw new Error('Temporarily, notes including mentions, replies and renotes to local-user from remote users which is not followed by local-users are not allowed'); From 6459c837214ca22a22f84b922fd5c5a30db08a12 Mon Sep 17 00:00:00 2001 From: icalo35 Date: Wed, 28 Feb 2024 23:08:08 +0900 Subject: [PATCH 06/15] =?UTF-8?q?=E4=BA=A4=E6=B5=81=E7=84=A1=E3=81=97?= =?UTF-8?q?=E3=83=A6=E3=83=BC=E3=82=B6=E3=81=8B=E3=82=89=E3=81=AE=E6=8A=95?= =?UTF-8?q?=E7=A8=BF=E6=8B=92=E5=90=A6=E6=A9=9F=E8=83=BD=E3=82=92cherry-pi?= =?UTF-8?q?ck=E3=81=97=E3=80=81CHANGELOG=E7=AD=89=E3=81=AB=E8=BF=BD?= =?UTF-8?q?=E8=A8=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32c9bd0aec9..677c5f92d65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ - --> +## 2024.2.0-voskey +### Server +- ローカルユーザーがまだ誰もフォローしていないリモートユーザーによる通知を引き起こす可能性のある投稿を拒否できるように(すしすきー様 2024.2.0-sushiskiより借用) ## 2024.2.0 diff --git a/package.json b/package.json index 3f94448db7c..a1943834643 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "2024.2.0", + "version": "2024.2.0-voskey", "codename": "nasubi", "repository": { "type": "git", From a81394a844a14a6ade0f4b273e4557f38c4beb8d Mon Sep 17 00:00:00 2001 From: icalo35 Date: Sun, 21 Apr 2024 19:08:42 +0900 Subject: [PATCH 07/15] =?UTF-8?q?=E5=A4=89=E6=9B=B4=E5=B1=A5=E6=AD=B4=2020?= =?UTF-8?q?24.2.0-voskey=E3=81=AE=E4=BD=8D=E7=BD=AE=E3=82=92=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c799668b7fd..a973600aea4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,9 +11,7 @@ - --> -## 2024.2.0-voskey -### Server -- ローカルユーザーがまだ誰もフォローしていないリモートユーザーによる通知を引き起こす可能性のある投稿を拒否できるように(すしすきー様 2024.2.0-sushiskiより借用) + ## 2024.3.1 @@ -67,6 +65,10 @@ - `category`および`licence`が指定なしの時勝手にnullに上書きされる挙動を修正 - Fix: 通知の受信設定で「相互フォロー」が正しく動作しない問題を修正 +## 2024.2.0-voskey +### Server +- ローカルユーザーがまだ誰もフォローしていないリモートユーザーによる通知を引き起こす可能性のある投稿を拒否できるように(すしすきー様 2024.2.0-sushiskiより借用) + ## 2024.2.0 ### Note From 1184447795743b2f76fe7f6005b361501d99463b Mon Sep 17 00:00:00 2001 From: icalo35 Date: Sun, 16 Jun 2024 02:08:21 +0900 Subject: [PATCH 08/15] =?UTF-8?q?(cherry-pick=E5=88=86=E3=81=AE=E9=99=A4?= =?UTF-8?q?=E5=8E=BB)=20=E3=80=8C=E3=83=AD=E3=83=BC=E3=82=AB=E3=83=AB?= =?UTF-8?q?=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E3=81=8C=E3=81=BE=E3=81=A0?= =?UTF-8?q?=E8=AA=B0=E3=82=82=E3=83=95=E3=82=A9=E3=83=AD=E3=83=BC=E3=81=97?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=81=AA=E3=81=84=E3=83=AA=E3=83=A2=E3=83=BC?= =?UTF-8?q?=E3=83=88=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E3=81=AB=E3=82=88?= =?UTF-8?q?=E3=82=8B=E9=80=9A=E7=9F=A5=E3=82=92=E5=BC=95=E3=81=8D=E8=B5=B7?= =?UTF-8?q?=E3=81=93=E3=81=99=E5=8F=AF=E8=83=BD=E6=80=A7=E3=81=AE=E3=81=82?= =?UTF-8?q?=E3=82=8B=E6=8A=95=E7=A8=BF=E3=82=92=E6=8B=92=E5=90=A6=E3=81=A7?= =?UTF-8?q?=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=80=8D=E6=A9=9F?= =?UTF-8?q?=E8=83=BD=E3=82=92=E3=82=AA=E3=83=9F=E3=83=83=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/example.yml | 4 ---- packages/backend/src/config.ts | 3 --- packages/backend/src/core/NoteCreateService.ts | 9 --------- 3 files changed, 16 deletions(-) diff --git a/.config/example.yml b/.config/example.yml index fe9bb3266d3..b11cbd13732 100644 --- a/.config/example.yml +++ b/.config/example.yml @@ -297,7 +297,3 @@ signToActivityPubGet: true # PID File of master process #pidFile: /tmp/misskey.pid - -# ローカル宛てのメンション、リプライ、引用ノートの発行元が、ローカルユーザーにフォローされていない場合に投稿を拒否するかどうか -# default: false -# misskeyBlockMentionsFromUnfamiliarRemoteUsers: false diff --git a/packages/backend/src/config.ts b/packages/backend/src/config.ts index 76700c5b995..0ac521d4094 100644 --- a/packages/backend/src/config.ts +++ b/packages/backend/src/config.ts @@ -96,7 +96,6 @@ type Source = { perUserNotificationsMaxCount?: number; deactivateAntennaThreshold?: number; pidFile: string; - misskeyBlockMentionsFromUnfamiliarRemoteUsers?: boolean; }; export type Config = { @@ -176,7 +175,6 @@ export type Config = { perUserNotificationsMaxCount: number; deactivateAntennaThreshold: number; pidFile: string; - misskeyBlockMentionsFromUnfamiliarRemoteUsers: boolean; }; const _filename = fileURLToPath(import.meta.url); @@ -274,7 +272,6 @@ export function loadConfig(): Config { perUserNotificationsMaxCount: config.perUserNotificationsMaxCount ?? 500, deactivateAntennaThreshold: config.deactivateAntennaThreshold ?? (1000 * 60 * 60 * 24 * 7), pidFile: config.pidFile, - misskeyBlockMentionsFromUnfamiliarRemoteUsers: config.misskeyBlockMentionsFromUnfamiliarRemoteUsers ?? false, }; } diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 9ea6f8a2f28..e5580f36d11 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -365,15 +365,6 @@ export class NoteCreateService implements OnApplicationShutdown { mentionedUsers = data.apMentions ?? await this.extractMentionedUsers(user, combinedTokens); } - const willCauseNotification = mentionedUsers.filter(u => u.host === null).length > 0 || data.reply?.userHost === null || data.renote?.userHost === null; - - if (this.config.misskeyBlockMentionsFromUnfamiliarRemoteUsers === true && user.host !== null && willCauseNotification) { - const userEntity = await this.usersRepository.findOneBy({ id: user.id }); - if ((userEntity?.followersCount ?? 0) === 0) { - throw new Error('Temporarily, notes including mentions, replies and renotes to local-user from remote users which is not followed by local-users are not allowed'); - } - } - tags = tags.filter(tag => Array.from(tag).length <= 128).splice(0, 32); if (data.reply && (user.id !== data.reply.userId) && !mentionedUsers.some(u => u.id === data.reply!.userId)) { From 8c5a9b4b06a6d9a1b0f11c120067b4bd8a862eaa Mon Sep 17 00:00:00 2001 From: icalo35 Date: Sun, 16 Jun 2024 02:16:04 +0900 Subject: [PATCH 09/15] =?UTF-8?q?=E6=96=B0=E8=A6=8F=E3=83=A6=E3=83=BC?= =?UTF-8?q?=E3=82=B6=E3=81=AE=E3=80=8C=E5=B8=B8=E3=81=AB=E5=BA=83=E5=91=8A?= =?UTF-8?q?=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B=E3=80=8D=E3=82=92?= =?UTF-8?q?=E3=83=87=E3=83=95=E3=82=A9=E3=83=AB=E3=83=88=E3=81=A7=E3=82=AA?= =?UTF-8?q?=E3=83=B3=E3=81=A8=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index e8eb5a1ed7d..1dd6a8a2a68 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -368,7 +368,7 @@ export const defaultStore = markRaw(new Storage('base', { }, forceShowAds: { where: 'device', - default: false, + default: true, }, aiChanMode: { where: 'device', From 9fda3a4e88bb03e600eb5c1baa72da73d53b8613 Mon Sep 17 00:00:00 2001 From: icalo35 Date: Sun, 16 Jun 2024 03:16:44 +0900 Subject: [PATCH 10/15] =?UTF-8?q?=E3=83=87=E3=83=95=E3=82=A9=E3=83=AB?= =?UTF-8?q?=E3=83=88=E3=81=AE=E7=B5=B5=E6=96=87=E5=AD=97=E3=82=92=E3=82=AA?= =?UTF-8?q?=E3=82=B9=E3=82=B9=E3=83=A1=E3=81=AE=E3=82=82=E3=81=AE=E3=81=AB?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index 1dd6a8a2a68..1611abeb7a2 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -118,7 +118,7 @@ export const defaultStore = markRaw(new Storage('base', { }, reactions: { where: 'account', - default: ['👍', '❤️', '😆', '🤔', '😮', '🎉', '💢', '😥', '😇', '🍮'], + default: ['👍', '❤️', '⭐', '🤔', '😩', '㊗️', '🍮' , ':iihanashi:','🈂️',':kandou:', ':voskey_icon:' , ':takahashi_fankit:'], }, pinnedEmojis: { where: 'account', From d4b24e1410263a4b53b5c003351a5b770ce36cc8 Mon Sep 17 00:00:00 2001 From: icalo35 Date: Sun, 16 Jun 2024 03:20:56 +0900 Subject: [PATCH 11/15] =?UTF-8?q?2024.5.0-voskey=E3=81=AE=E5=A4=89?= =?UTF-8?q?=E6=9B=B4=E5=B1=A5=E6=AD=B4=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6239c7561d0..19f7359bdf8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 2024.5.0-voskey +### Server +- 以下の機能を除去して元に戻す → (ローカルユーザーがまだ誰もフォローしていないリモートユーザーによる通知を引き起こす可能性のある投稿を拒否できるように) +### Client +- デフォルトで「常に広告を表示する」をオンに +- デフォルトのピン留め(リアクション)を変更 + ## 2024.5.0 ### Note From c507196df1f0005d70600b4829d1e0726935e7bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BE=E3=81=A3=E3=81=A1=E3=82=83=E3=81=A8=E3=83=BC?= =?UTF-8?q?=E3=81=AB=E3=82=85?= <17376330+u1-liquid@users.noreply.github.com> Date: Sun, 18 Feb 2024 03:47:17 +0900 Subject: [PATCH 12/15] =?UTF-8?q?spec(backend/NoteCreateService):=20?= =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=82=AB=E3=83=AB=E3=83=A6=E3=83=BC=E3=82=B6?= =?UTF-8?q?=E3=83=BC=E3=81=8C=E3=81=BE=E3=81=A0=E8=AA=B0=E3=82=82=E3=83=95?= =?UTF-8?q?=E3=82=A9=E3=83=AD=E3=83=BC=E3=81=97=E3=81=A6=E3=81=84=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=83=AA=E3=83=A2=E3=83=BC=E3=83=88=E3=83=A6=E3=83=BC?= =?UTF-8?q?=E3=82=B6=E3=83=BC=E3=81=AB=E3=82=88=E3=82=8B=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E3=82=92=E5=BC=95=E3=81=8D=E8=B5=B7=E3=81=93=E3=81=99=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E6=80=A7=E3=81=AE=E3=81=82=E3=82=8B=E6=8A=95=E7=A8=BF?= =?UTF-8?q?=E3=82=92=E6=8B=92=E5=90=A6=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=20(MisskeyIO#462)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cherry-picked from 738b4d69701a9d4b232f6a44b340782d096b182b, 1b3adcc2bbc695a0f28f5865a6705e0e59830962, 33cb50761ec12fc0df0e6f99ba97e0d5d4e580fc, a27af00e23a5283e357de1e6bf2a47ebefaa77c2, 5c6236bb0f1fde9140e331c9e1390bb5fccd4f9a Co-authored-by: Ebise Lutica <7106976+EbiseLutica@users.noreply.github.com> --- packages/backend/src/core/NoteCreateService.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 56ddcefd7c4..bc14a299dbd 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -368,6 +368,16 @@ export class NoteCreateService implements OnApplicationShutdown { // if the host is media-silenced, custom emojis are not allowed if (this.utilityService.isMediaSilencedHost(this.meta.mediaSilencedHosts, user.host)) emojis = []; + const willCauseNotification = mentionedUsers.filter(u => u.host === null).length > 0 || data.reply?.userHost === null || data.renote?.userHost === null; + + if (process.env.MISSKEY_BLOCK_MENTIONS_FROM_UNFAMILIAR_REMOTE_USERS === 'true' && user.host !== null && willCauseNotification) { + const userEntity = await this.usersRepository.findOneBy({ id: user.id }); + if ((userEntity?.followersCount ?? 0) === 0) { + this.logger.error('Request rejected because user has no local followers', { user: user.id, note: data }); + throw new IdentifiableError('e11b3a16-f543-4885-8eb1-66cad131dbfd', 'Notes including mentions, replies, or renotes from remote users are not allowed until user has at least one local follower.'); + } + } + tags = tags.filter(tag => Array.from(tag).length <= 128).splice(0, 32); if (data.reply && (user.id !== data.reply.userId) && !mentionedUsers.some(u => u.id === data.reply!.userId)) { From 92c307443dbb9994ef744ad035a2956df2f345be Mon Sep 17 00:00:00 2001 From: na2na-p Date: Sun, 18 Feb 2024 11:51:08 +0900 Subject: [PATCH 13/15] =?UTF-8?q?=E3=83=AD=E3=82=AE=E3=83=B3=E3=82=B0?= =?UTF-8?q?=E5=91=A8=E3=82=8A=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/NoteCreateService.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index bc14a299dbd..5797752524a 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -373,8 +373,7 @@ export class NoteCreateService implements OnApplicationShutdown { if (process.env.MISSKEY_BLOCK_MENTIONS_FROM_UNFAMILIAR_REMOTE_USERS === 'true' && user.host !== null && willCauseNotification) { const userEntity = await this.usersRepository.findOneBy({ id: user.id }); if ((userEntity?.followersCount ?? 0) === 0) { - this.logger.error('Request rejected because user has no local followers', { user: user.id, note: data }); - throw new IdentifiableError('e11b3a16-f543-4885-8eb1-66cad131dbfd', 'Notes including mentions, replies, or renotes from remote users are not allowed until user has at least one local follower.'); + throw new Error('Temporarily, notes including mentions, replies and renotes to local-user from remote users which is not followed by local-users are not allowed'); } } From b0fb15a39616ca1b0a3c70f9f3431f9912533490 Mon Sep 17 00:00:00 2001 From: na2na-p Date: Sun, 18 Feb 2024 11:57:30 +0900 Subject: [PATCH 14/15] =?UTF-8?q?=E5=BC=BE=E3=81=8F=E5=BC=BE=E3=81=8B?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=81=AE=E6=8C=99=E5=8B=95=E6=B1=BA=E5=AE=9A?= =?UTF-8?q?=E3=82=92default.yml=E3=81=AB=E3=82=84=E3=82=89=E3=81=9B?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/example.yml | 4 ++++ packages/backend/src/config.ts | 3 +++ packages/backend/src/core/NoteCreateService.ts | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.config/example.yml b/.config/example.yml index 60a6a0aa71b..bae574d9c3a 100644 --- a/.config/example.yml +++ b/.config/example.yml @@ -321,3 +321,7 @@ signToActivityPubGet: true # PID File of master process #pidFile: /tmp/misskey.pid + +# ローカル宛てのメンション、リプライ、引用ノートの発行元が、ローカルユーザーにフォローされていない場合に投稿を拒否するかどうか +# default: false +# misskeyBlockMentionsFromUnfamiliarRemoteUsers: false diff --git a/packages/backend/src/config.ts b/packages/backend/src/config.ts index 42f1033b9d0..474f198c97d 100644 --- a/packages/backend/src/config.ts +++ b/packages/backend/src/config.ts @@ -99,6 +99,7 @@ type Source = { perUserNotificationsMaxCount?: number; deactivateAntennaThreshold?: number; pidFile: string; + misskeyBlockMentionsFromUnfamiliarRemoteUsers?: boolean; }; export type Config = { @@ -182,6 +183,7 @@ export type Config = { perUserNotificationsMaxCount: number; deactivateAntennaThreshold: number; pidFile: string; + misskeyBlockMentionsFromUnfamiliarRemoteUsers: boolean; }; const _filename = fileURLToPath(import.meta.url); @@ -293,6 +295,7 @@ export function loadConfig(): Config { perUserNotificationsMaxCount: config.perUserNotificationsMaxCount ?? 500, deactivateAntennaThreshold: config.deactivateAntennaThreshold ?? (1000 * 60 * 60 * 24 * 7), pidFile: config.pidFile, + misskeyBlockMentionsFromUnfamiliarRemoteUsers: config.misskeyBlockMentionsFromUnfamiliarRemoteUsers ?? false, }; } diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 5797752524a..cb5e98e9c55 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -370,7 +370,7 @@ export class NoteCreateService implements OnApplicationShutdown { const willCauseNotification = mentionedUsers.filter(u => u.host === null).length > 0 || data.reply?.userHost === null || data.renote?.userHost === null; - if (process.env.MISSKEY_BLOCK_MENTIONS_FROM_UNFAMILIAR_REMOTE_USERS === 'true' && user.host !== null && willCauseNotification) { + if (this.config.misskeyBlockMentionsFromUnfamiliarRemoteUsers === true && user.host !== null && willCauseNotification) { const userEntity = await this.usersRepository.findOneBy({ id: user.id }); if ((userEntity?.followersCount ?? 0) === 0) { throw new Error('Temporarily, notes including mentions, replies and renotes to local-user from remote users which is not followed by local-users are not allowed'); From 7ff40a205958dc10c99605e705d4ec578978dbf9 Mon Sep 17 00:00:00 2001 From: icalo35 Date: Mon, 2 Dec 2024 00:12:58 +0900 Subject: [PATCH 15/15] =?UTF-8?q?=E4=BA=A4=E6=B5=81=E7=84=A1=E3=81=97?= =?UTF-8?q?=E3=83=A6=E3=83=BC=E3=82=B6=E3=81=8B=E3=82=89=E3=81=AE=E6=8A=95?= =?UTF-8?q?=E7=A8=BF=E6=8B=92=E5=90=A6=E6=A9=9F=E8=83=BD=E3=82=92cherry-pi?= =?UTF-8?q?ck=E3=81=97=E3=80=81CHANGELOG=E7=AD=89=E3=81=AB=E8=BF=BD?= =?UTF-8?q?=E8=A8=98(10=E3=83=B5=E6=9C=88=E3=81=B6=E3=82=8A2=E5=9B=9E?= =?UTF-8?q?=E7=9B=AE)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index de3ddf95f6d..e8615c0c69a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2024.11.0-voskey +### Server +- 以下の借用機能は任意にON/OFF出来るのでわざわざ除去する必要がなく、使いたい状況がある事に気付いたので、OFFの状態で再度導入 → (ローカルユーザーがまだ誰もフォローしていないリモートユーザーによる通知を引き起こす可能性のある投稿を拒否できるように) + ## 2024.11.0 ### Note