Compare commits

..

No commits in common. "58cb7cf1794997a64e0b3f9044182e3d595a9e1c" and "0d18c0169fd21fda8177e2974ec6af5c7082de85" have entirely different histories.

13 changed files with 23 additions and 39 deletions

View File

@ -12,7 +12,7 @@
- 参加中のルームをミュートして通知が来ないように設定可能です - 参加中のルームをミュートして通知が来ないように設定可能です
- メッセージにはリアクションも可能です - メッセージにはリアクションも可能です
- 現在、リモートユーザーがチャットを受け付ける設定になっているかどうかを取得する術がないため、ローカルユーザー間でのみ利用可能です - 現在、リモートユーザーがチャットを受け付ける設定になっているかどうかを取得する術がないため、ローカルユーザー間でのみ利用可能です
- Feat: アカウントの移行時に古いアカウントからあたらしいアカウントにロールをコピーできるようになりました。 - Feat: アカウントのマイグレーション時に古いアカウントからロールをコピーできるようになりました。
- 管理者がロールの設定でマイグレーション時にコピーするかを指定できるようになります。 - 管理者がロールの設定でマイグレーション時にコピーするかを指定できるようになります。
- Enhance: セキュリティを強化するため、ジョブキューのダッシュボード(bull-board)統合が削除されました。 - Enhance: セキュリティを強化するため、ジョブキューのダッシュボード(bull-board)統合が削除されました。
- Misskeyネイティブでダッシュボードを実装予定です - Misskeyネイティブでダッシュボードを実装予定です

2
locales/index.d.ts vendored
View File

@ -1717,7 +1717,7 @@ export interface Locale extends ILocale {
/** /**
* *
*/ */
"excludeNotesInSensitiveChannel": string; "hideNotesInSensitiveChannel": string;
/** /**
* *
*/ */

View File

@ -424,7 +424,7 @@ antennaExcludeBots: "Botアカウントを除外"
antennaKeywordsDescription: "スペースで区切るとAND指定になり、改行で区切るとOR指定になります" antennaKeywordsDescription: "スペースで区切るとAND指定になり、改行で区切るとOR指定になります"
notifyAntenna: "新しいノートを通知する" notifyAntenna: "新しいノートを通知する"
withFileAntenna: "ファイルが添付されたノートのみ" withFileAntenna: "ファイルが添付されたノートのみ"
excludeNotesInSensitiveChannel: "センシティブなチャンネルのノートを除外" hideNotesInSensitiveChannel: "センシティブなチャンネルのノートを非表示"
enableServiceworker: "ブラウザへのプッシュ通知を有効にする" enableServiceworker: "ブラウザへのプッシュ通知を有効にする"
antennaUsersDescription: "ユーザー名を改行で区切って指定します" antennaUsersDescription: "ユーザー名を改行で区切って指定します"
caseSensitive: "大文字小文字を区別する" caseSensitive: "大文字小文字を区別する"

View File

@ -1,16 +0,0 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
export class ExcludeNotesInSensitiveChannel1744075766000 {
name = 'ExcludeNotesInSensitiveChannel1744075766000'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "antenna" RENAME COLUMN "hideNotesInSensitiveChannel" TO "excludeNotesInSensitiveChannel"`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "antenna" RENAME COLUMN "excludeNotesInSensitiveChannel" TO "hideNotesInSensitiveChannel"`);
}
}

View File

@ -114,7 +114,7 @@ export class AntennaService implements OnApplicationShutdown {
if (note.visibility === 'specified') return false; if (note.visibility === 'specified') return false;
if (note.visibility === 'followers') return false; if (note.visibility === 'followers') return false;
if (antenna.excludeNotesInSensitiveChannel && note.channel?.isSensitive) return false; if (antenna.hideNotesInSensitiveChannel && note.channel?.isSensitive) return false;
if (antenna.excludeBots && noteUser.isBot) return false; if (antenna.excludeBots && noteUser.isBot) return false;

View File

@ -41,7 +41,7 @@ export class AntennaEntityService {
excludeBots: antenna.excludeBots, excludeBots: antenna.excludeBots,
withReplies: antenna.withReplies, withReplies: antenna.withReplies,
withFile: antenna.withFile, withFile: antenna.withFile,
excludeNotesInSensitiveChannel: antenna.excludeNotesInSensitiveChannel, hideNotesInSensitiveChannel: antenna.hideNotesInSensitiveChannel,
isActive: antenna.isActive, isActive: antenna.isActive,
hasUnreadNote: false, // TODO hasUnreadNote: false, // TODO
notify: false, // 後方互換性のため notify: false, // 後方互換性のため

View File

@ -104,5 +104,5 @@ export class MiAntenna {
@Column('boolean', { @Column('boolean', {
default: false, default: false,
}) })
public excludeNotesInSensitiveChannel: boolean; public hideNotesInSensitiveChannel: boolean;
} }

View File

@ -100,7 +100,7 @@ export const packedAntennaSchema = {
optional: false, nullable: false, optional: false, nullable: false,
default: false, default: false,
}, },
excludeNotesInSensitiveChannel: { hideNotesInSensitiveChannel: {
type: 'boolean', type: 'boolean',
optional: false, nullable: false, optional: false, nullable: false,
default: false, default: false,

View File

@ -73,7 +73,7 @@ export const paramDef = {
excludeBots: { type: 'boolean' }, excludeBots: { type: 'boolean' },
withReplies: { type: 'boolean' }, withReplies: { type: 'boolean' },
withFile: { type: 'boolean' }, withFile: { type: 'boolean' },
excludeNotesInSensitiveChannel: { type: 'boolean' }, hideNotesInSensitiveChannel: { type: 'boolean' },
}, },
required: ['name', 'src', 'keywords', 'excludeKeywords', 'users', 'caseSensitive', 'withReplies', 'withFile'], required: ['name', 'src', 'keywords', 'excludeKeywords', 'users', 'caseSensitive', 'withReplies', 'withFile'],
} as const; } as const;
@ -134,7 +134,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
excludeBots: ps.excludeBots, excludeBots: ps.excludeBots,
withReplies: ps.withReplies, withReplies: ps.withReplies,
withFile: ps.withFile, withFile: ps.withFile,
excludeNotesInSensitiveChannel: ps.excludeNotesInSensitiveChannel, hideNotesInSensitiveChannel: ps.hideNotesInSensitiveChannel,
}); });
this.globalEventService.publishInternalEvent('antennaCreated', antenna); this.globalEventService.publishInternalEvent('antennaCreated', antenna);

View File

@ -72,7 +72,7 @@ export const paramDef = {
excludeBots: { type: 'boolean' }, excludeBots: { type: 'boolean' },
withReplies: { type: 'boolean' }, withReplies: { type: 'boolean' },
withFile: { type: 'boolean' }, withFile: { type: 'boolean' },
excludeNotesInSensitiveChannel: { type: 'boolean' }, hideNotesInSensitiveChannel: { type: 'boolean' },
}, },
required: ['antennaId'], required: ['antennaId'],
} as const; } as const;
@ -130,7 +130,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
excludeBots: ps.excludeBots, excludeBots: ps.excludeBots,
withReplies: ps.withReplies, withReplies: ps.withReplies,
withFile: ps.withFile, withFile: ps.withFile,
excludeNotesInSensitiveChannel: ps.excludeNotesInSensitiveChannel, hideNotesInSensitiveChannel: ps.hideNotesInSensitiveChannel,
isActive: true, isActive: true,
lastUsedAt: new Date(), lastUsedAt: new Date(),
}); });

View File

@ -146,7 +146,7 @@ describe('アンテナ', () => {
caseSensitive: false, caseSensitive: false,
createdAt: new Date(response.createdAt).toISOString(), createdAt: new Date(response.createdAt).toISOString(),
excludeKeywords: [['']], excludeKeywords: [['']],
excludeNotesInSensitiveChannel: false, hideNotesInSensitiveChannel: false,
hasUnreadNote: false, hasUnreadNote: false,
isActive: true, isActive: true,
keywords: [['keyword']], keywords: [['keyword']],
@ -218,8 +218,8 @@ describe('アンテナ', () => {
{ parameters: () => ({ withReplies: true }) }, { parameters: () => ({ withReplies: true }) },
{ parameters: () => ({ withFile: false }) }, { parameters: () => ({ withFile: false }) },
{ parameters: () => ({ withFile: true }) }, { parameters: () => ({ withFile: true }) },
{ parameters: () => ({ excludeNotesInSensitiveChannel: false }) }, { parameters: () => ({ hideNotesInSensitiveChannel: false }) },
{ parameters: () => ({ excludeNotesInSensitiveChannel: true }) }, { parameters: () => ({ hideNotesInSensitiveChannel: true }) },
]; ];
test.each(antennaParamPattern)('を作成できること($#)', async ({ parameters }) => { test.each(antennaParamPattern)('を作成できること($#)', async ({ parameters }) => {
const response = await successfulApiCall({ const response = await successfulApiCall({
@ -633,7 +633,7 @@ describe('アンテナ', () => {
const keyword = 'キーワード'; const keyword = 'キーワード';
const antenna = await successfulApiCall({ const antenna = await successfulApiCall({
endpoint: 'antennas/create', endpoint: 'antennas/create',
parameters: { ...defaultParam, keywords: [[keyword]], excludeNotesInSensitiveChannel: true }, parameters: { ...defaultParam, keywords: [[keyword]], hideNotesInSensitiveChannel: true },
user: alice, user: alice,
}); });
const nonSensitiveChannel = await successfulApiCall({ const nonSensitiveChannel = await successfulApiCall({

View File

@ -39,7 +39,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkSwitch v-model="localOnly">{{ i18n.ts.localOnly }}</MkSwitch> <MkSwitch v-model="localOnly">{{ i18n.ts.localOnly }}</MkSwitch>
<MkSwitch v-model="caseSensitive">{{ i18n.ts.caseSensitive }}</MkSwitch> <MkSwitch v-model="caseSensitive">{{ i18n.ts.caseSensitive }}</MkSwitch>
<MkSwitch v-model="withFile">{{ i18n.ts.withFileAntenna }}</MkSwitch> <MkSwitch v-model="withFile">{{ i18n.ts.withFileAntenna }}</MkSwitch>
<MkSwitch v-model="excludeNotesInSensitiveChannel">{{ i18n.ts.excludeNotesInSensitiveChannel }}</MkSwitch> <MkSwitch v-model="hideNotesInSensitiveChannel">{{ i18n.ts.hideNotesInSensitiveChannel }}</MkSwitch>
</div> </div>
<div :class="$style.actions"> <div :class="$style.actions">
<div class="_buttons"> <div class="_buttons">
@ -54,7 +54,6 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup> <script lang="ts" setup>
import { watch, ref } from 'vue'; import { watch, ref } from 'vue';
import * as Misskey from 'misskey-js'; import * as Misskey from 'misskey-js';
import type { DeepPartial } from '@/utility/merge.js';
import MkButton from '@/components/MkButton.vue'; import MkButton from '@/components/MkButton.vue';
import MkInput from '@/components/MkInput.vue'; import MkInput from '@/components/MkInput.vue';
import MkTextarea from '@/components/MkTextarea.vue'; import MkTextarea from '@/components/MkTextarea.vue';
@ -64,6 +63,7 @@ import * as os from '@/os.js';
import { misskeyApi } from '@/utility/misskey-api.js'; import { misskeyApi } from '@/utility/misskey-api.js';
import { i18n } from '@/i18n.js'; import { i18n } from '@/i18n.js';
import { deepMerge } from '@/utility/merge.js'; import { deepMerge } from '@/utility/merge.js';
import type { DeepPartial } from '@/utility/merge.js';
type PartialAllowedAntenna = Omit<Misskey.entities.Antenna, 'id' | 'createdAt' | 'updatedAt'> & { type PartialAllowedAntenna = Omit<Misskey.entities.Antenna, 'id' | 'createdAt' | 'updatedAt'> & {
id?: string; id?: string;
@ -87,7 +87,7 @@ const initialAntenna = deepMerge<PartialAllowedAntenna>(props.antenna ?? {}, {
caseSensitive: false, caseSensitive: false,
localOnly: false, localOnly: false,
withFile: false, withFile: false,
excludeNotesInSensitiveChannel: false, hideNotesInSensitiveChannel: false,
isActive: true, isActive: true,
hasUnreadNote: false, hasUnreadNote: false,
notify: false, notify: false,
@ -110,7 +110,7 @@ const localOnly = ref<boolean>(initialAntenna.localOnly);
const excludeBots = ref<boolean>(initialAntenna.excludeBots); const excludeBots = ref<boolean>(initialAntenna.excludeBots);
const withReplies = ref<boolean>(initialAntenna.withReplies); const withReplies = ref<boolean>(initialAntenna.withReplies);
const withFile = ref<boolean>(initialAntenna.withFile); const withFile = ref<boolean>(initialAntenna.withFile);
const excludeNotesInSensitiveChannel = ref<boolean>(initialAntenna.excludeNotesInSensitiveChannel); const hideNotesInSensitiveChannel = ref<boolean>(initialAntenna.hideNotesInSensitiveChannel);
const userLists = ref<Misskey.entities.UserList[] | null>(null); const userLists = ref<Misskey.entities.UserList[] | null>(null);
watch(() => src.value, async () => { watch(() => src.value, async () => {
@ -127,7 +127,7 @@ async function saveAntenna() {
excludeBots: excludeBots.value, excludeBots: excludeBots.value,
withReplies: withReplies.value, withReplies: withReplies.value,
withFile: withFile.value, withFile: withFile.value,
excludeNotesInSensitiveChannel: excludeNotesInSensitiveChannel.value, hideNotesInSensitiveChannel: hideNotesInSensitiveChannel.value,
caseSensitive: caseSensitive.value, caseSensitive: caseSensitive.value,
localOnly: localOnly.value, localOnly: localOnly.value,
users: users.value.trim().split('\n').map(x => x.trim()), users: users.value.trim().split('\n').map(x => x.trim()),

View File

@ -4899,7 +4899,7 @@ export type components = {
/** @default false */ /** @default false */
notify: boolean; notify: boolean;
/** @default false */ /** @default false */
excludeNotesInSensitiveChannel: boolean; hideNotesInSensitiveChannel: boolean;
}; };
Clip: { Clip: {
/** /**
@ -11340,7 +11340,7 @@ export type operations = {
excludeBots?: boolean; excludeBots?: boolean;
withReplies: boolean; withReplies: boolean;
withFile: boolean; withFile: boolean;
excludeNotesInSensitiveChannel?: boolean; hideNotesInSensitiveChannel?: boolean;
}; };
}; };
}; };
@ -11622,7 +11622,7 @@ export type operations = {
excludeBots?: boolean; excludeBots?: boolean;
withReplies?: boolean; withReplies?: boolean;
withFile?: boolean; withFile?: boolean;
excludeNotesInSensitiveChannel?: boolean; hideNotesInSensitiveChannel?: boolean;
}; };
}; };
}; };