diff --git a/.config/example.yml b/.config/example.yml index d4584215c97..3639e9fe612 100644 --- a/.config/example.yml +++ b/.config/example.yml @@ -350,6 +350,10 @@ signToActivityPubGet: true # PID File of master process #pidFile: /tmp/misskey.pid +# ローカル宛てのメンション、リプライ、引用ノートの発行元が、ローカルユーザーにフォローされていない場合に投稿を拒否するかどうか +# default: false +# misskeyBlockMentionsFromUnfamiliarRemoteUsers: false + # Log settings # logging: # sql: diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bfd25eac5b..e0101f1ae5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -255,6 +255,10 @@ ### Misskey.js - Feat: allow setting `binaryType` of WebSocket connection +## 2024.11.0-voskey +### Server +- 以下の借用機能は任意にON/OFF出来るのでわざわざ除去する必要がなく、使いたい状況がある事に気付いたので、OFFの状態で再度導入 → (ローカルユーザーがまだ誰もフォローしていないリモートユーザーによる通知を引き起こす可能性のある投稿を拒否できるように) + ## 2024.11.0 ### Note @@ -602,6 +606,14 @@ - Feat: `/drive/files/create` のリクエストに対応(`multipart/form-data`に対応) - Feat: `/admin/role/create` のロールポリシーの型を修正 + +## 2024.5.0-voskey +### Server +- 以下の機能を除去して元に戻す → (ローカルユーザーがまだ誰もフォローしていないリモートユーザーによる通知を引き起こす可能性のある投稿を拒否できるように) +### Client +- デフォルトで「常に広告を表示する」をオンに +- デフォルトのピン留め(リアクション)を変更 + ## 2024.5.0 ### Note @@ -707,6 +719,7 @@ - Fix: もともとセンシティブではないと連合されていたファイルがセンシティブとして連合された場合にセンシティブとしてそのファイルを扱うように - センシティブとして連合したファイルは非センシティブとして連合されてもセンシティブとして扱われます + ## 2024.3.1 ### General @@ -759,6 +772,10 @@ - `category`および`licence`が指定なしの時勝手にnullに上書きされる挙動を修正 - Fix: 通知の受信設定で「相互フォロー」が正しく動作しない問題を修正 +## 2024.2.0-voskey +### Server +- ローカルユーザーがまだ誰もフォローしていないリモートユーザーによる通知を引き起こす可能性のある投稿を拒否できるように(すしすきー様 2024.2.0-sushiskiより借用) + ## 2024.2.0 ### Note diff --git a/Dockerfile b/Dockerfile index 9d5596f1f18..300a8b9f73f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -66,8 +66,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 \ diff --git a/package.json b/package.json index 3e59baf9823..2daa605308f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "2025.4.0", + "version": "2025.4.0-voskey", "codename": "nasubi", "repository": { "type": "git", diff --git a/packages/backend/src/config.ts b/packages/backend/src/config.ts index 646fa079112..b22675702e1 100644 --- a/packages/backend/src/config.ts +++ b/packages/backend/src/config.ts @@ -109,6 +109,7 @@ type Source = { perUserNotificationsMaxCount?: number; deactivateAntennaThreshold?: number; pidFile: string; + misskeyBlockMentionsFromUnfamiliarRemoteUsers?: boolean; logging?: { sql?: { @@ -214,6 +215,7 @@ export type Config = { perUserNotificationsMaxCount: number; deactivateAntennaThreshold: number; pidFile: string; + misskeyBlockMentionsFromUnfamiliarRemoteUsers: boolean; }; export type FulltextSearchProvider = 'sqlLike' | 'sqlPgroonga' | 'meilisearch'; @@ -329,6 +331,7 @@ export function loadConfig(): Config { perUserNotificationsMaxCount: config.perUserNotificationsMaxCount ?? 500, deactivateAntennaThreshold: config.deactivateAntennaThreshold ?? (1000 * 60 * 60 * 24 * 7), pidFile: config.pidFile, + misskeyBlockMentionsFromUnfamiliarRemoteUsers: config.misskeyBlockMentionsFromUnfamiliarRemoteUsers ?? false, logging: config.logging, }; } diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 1ddb2b173de..bdffa586323 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -366,6 +366,15 @@ 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 (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)) { 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 d7c9ea3964b..a40936553e5 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: { diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index fc1d4636741..a4c8bce431e 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -176,6 +176,26 @@ export const store = markRaw(new Pizzax('base', { where: 'account', default: false, }, + memo: { + where: 'account', + default: null, + }, + reactions: { + where: 'account', + default: ['👍', '❤️', '⭐', '🤔', '😩', '㊗️', '🍮' , ':iihanashi:','🈂️',':kandou:', ':voskey_icon:' , ':takahashi_fankit:'], + }, + pinnedEmojis: { + where: 'account', + default: [], + }, + reactionAcceptance: { + where: 'account', + default: 'nonSensitiveOnly' as 'likeOnly' | 'likeOnlyForRemote' | 'nonSensitiveOnly' | 'nonSensitiveOnlyForLocalLikeOnlyForRemote' | null, + }, + mutedAds: { + where: 'account', + default: [] as string[], + }, menu: { where: 'deviceAccount', default: [ @@ -340,7 +360,7 @@ export const store = markRaw(new Pizzax('base', { }, forceShowAds: { where: 'device', - default: false, + default: true, }, aiChanMode: { where: 'device',