mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 20:44:34 +00:00
Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop
This commit is contained in:
commit
e4ceab5f6c
27 changed files with 295 additions and 5 deletions
|
@ -165,6 +165,11 @@ id: 'aidx'
|
||||||
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
||||||
|
|
||||||
#sentryForFrontend:
|
#sentryForFrontend:
|
||||||
|
# vueIntegration:
|
||||||
|
# tracingOptions:
|
||||||
|
# trackComponents: true
|
||||||
|
# browserTracingIntegration:
|
||||||
|
# replayIntegration:
|
||||||
# options:
|
# options:
|
||||||
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
||||||
|
|
||||||
|
|
|
@ -177,6 +177,11 @@ id: 'aidx'
|
||||||
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
||||||
|
|
||||||
#sentryForFrontend:
|
#sentryForFrontend:
|
||||||
|
# vueIntegration:
|
||||||
|
# tracingOptions:
|
||||||
|
# trackComponents: true
|
||||||
|
# browserTracingIntegration:
|
||||||
|
# replayIntegration:
|
||||||
# options:
|
# options:
|
||||||
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
||||||
|
|
||||||
|
|
|
@ -259,6 +259,11 @@ id: 'aidx'
|
||||||
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
||||||
|
|
||||||
#sentryForFrontend:
|
#sentryForFrontend:
|
||||||
|
# vueIntegration:
|
||||||
|
# tracingOptions:
|
||||||
|
# trackComponents: true
|
||||||
|
# browserTracingIntegration:
|
||||||
|
# replayIntegration:
|
||||||
# options:
|
# options:
|
||||||
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
||||||
|
|
||||||
|
|
|
@ -152,6 +152,11 @@ id: 'aidx'
|
||||||
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
||||||
|
|
||||||
#sentryForFrontend:
|
#sentryForFrontend:
|
||||||
|
# vueIntegration:
|
||||||
|
# tracingOptions:
|
||||||
|
# trackComponents: true
|
||||||
|
# browserTracingIntegration:
|
||||||
|
# replayIntegration:
|
||||||
# options:
|
# options:
|
||||||
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,11 @@
|
||||||
- メッセージにはリアクションも可能です
|
- メッセージにはリアクションも可能です
|
||||||
- Enhance: セキュリティを強化するため、ジョブキューのダッシュボード(bull-board)統合が削除されました。
|
- Enhance: セキュリティを強化するため、ジョブキューのダッシュボード(bull-board)統合が削除されました。
|
||||||
- Misskeyネイティブでダッシュボードを実装予定です
|
- Misskeyネイティブでダッシュボードを実装予定です
|
||||||
|
- Enhance: フロントエンドのエラートラッキングができるように
|
||||||
|
- `.config/default.yml`中の項目`sentryForFrontend`を適宜設定してください。
|
||||||
|
- 外部サービスであるSentryへエラー情報が送信されます。ご利用の地域の法令に従い、適切なプライバシーポリシーを策定の上で運用してください。
|
||||||
- Enhance: ミュートしているユーザーをユーザー検索の結果から除外するように
|
- Enhance: ミュートしているユーザーをユーザー検索の結果から除外するように
|
||||||
|
- Enhance: アンテナでセンシティブなチャンネルのノートを除外できるように `#14177`
|
||||||
- Fix: 通知のページネーションで2つ以上読み込めなくなることがある問題を修正
|
- Fix: 通知のページネーションで2つ以上読み込めなくなることがある問題を修正
|
||||||
|
|
||||||
### Client
|
### Client
|
||||||
|
|
|
@ -173,6 +173,11 @@ id: "aidx"
|
||||||
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
||||||
|
|
||||||
#sentryForFrontend:
|
#sentryForFrontend:
|
||||||
|
# vueIntegration:
|
||||||
|
# tracingOptions:
|
||||||
|
# trackComponents: true
|
||||||
|
# browserTracingIntegration:
|
||||||
|
# replayIntegration:
|
||||||
# options:
|
# options:
|
||||||
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
||||||
|
|
||||||
|
|
4
locales/index.d.ts
vendored
4
locales/index.d.ts
vendored
|
@ -1714,6 +1714,10 @@ export interface Locale extends ILocale {
|
||||||
* ファイルが添付されたノートのみ
|
* ファイルが添付されたノートのみ
|
||||||
*/
|
*/
|
||||||
"withFileAntenna": string;
|
"withFileAntenna": string;
|
||||||
|
/**
|
||||||
|
* センシティブなチャンネルのノートを非表示
|
||||||
|
*/
|
||||||
|
"hideNotesInSensitiveChannel": string;
|
||||||
/**
|
/**
|
||||||
* ブラウザへのプッシュ通知を有効にする
|
* ブラウザへのプッシュ通知を有効にする
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -424,6 +424,7 @@ antennaExcludeBots: "Botアカウントを除外"
|
||||||
antennaKeywordsDescription: "スペースで区切るとAND指定になり、改行で区切るとOR指定になります"
|
antennaKeywordsDescription: "スペースで区切るとAND指定になり、改行で区切るとOR指定になります"
|
||||||
notifyAntenna: "新しいノートを通知する"
|
notifyAntenna: "新しいノートを通知する"
|
||||||
withFileAntenna: "ファイルが添付されたノートのみ"
|
withFileAntenna: "ファイルが添付されたノートのみ"
|
||||||
|
hideNotesInSensitiveChannel: "センシティブなチャンネルのノートを非表示"
|
||||||
enableServiceworker: "ブラウザへのプッシュ通知を有効にする"
|
enableServiceworker: "ブラウザへのプッシュ通知を有効にする"
|
||||||
antennaUsersDescription: "ユーザー名を改行で区切って指定します"
|
antennaUsersDescription: "ユーザー名を改行で区切って指定します"
|
||||||
caseSensitive: "大文字小文字を区別する"
|
caseSensitive: "大文字小文字を区別する"
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
export class AddAntennaHideNotesInSensitiveChannel1736230492103 {
|
||||||
|
name = 'AddAntennaHideNotesInSensitiveChannel1736230492103'
|
||||||
|
|
||||||
|
async up(queryRunner) {
|
||||||
|
await queryRunner.query(`ALTER TABLE "antenna" ADD "hideNotesInSensitiveChannel" boolean NOT NULL DEFAULT false`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async down(queryRunner) {
|
||||||
|
await queryRunner.query(`ALTER TABLE "antenna" DROP COLUMN "hideNotesInSensitiveChannel"`);
|
||||||
|
}
|
||||||
|
}
|
|
@ -186,6 +186,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@jest/globals": "29.7.0",
|
"@jest/globals": "29.7.0",
|
||||||
"@nestjs/platform-express": "10.4.15",
|
"@nestjs/platform-express": "10.4.15",
|
||||||
|
"@sentry/vue": "9.8.0",
|
||||||
"@simplewebauthn/types": "12.0.0",
|
"@simplewebauthn/types": "12.0.0",
|
||||||
"@swc/jest": "0.2.37",
|
"@swc/jest": "0.2.37",
|
||||||
"@types/accepts": "1.3.7",
|
"@types/accepts": "1.3.7",
|
||||||
|
|
|
@ -7,7 +7,8 @@ import * as fs from 'node:fs';
|
||||||
import { fileURLToPath } from 'node:url';
|
import { fileURLToPath } from 'node:url';
|
||||||
import { dirname, resolve } from 'node:path';
|
import { dirname, resolve } from 'node:path';
|
||||||
import * as yaml from 'js-yaml';
|
import * as yaml from 'js-yaml';
|
||||||
import * as Sentry from '@sentry/node';
|
import type * as Sentry from '@sentry/node';
|
||||||
|
import type * as SentryVue from '@sentry/vue';
|
||||||
import type { RedisOptions } from 'ioredis';
|
import type { RedisOptions } from 'ioredis';
|
||||||
|
|
||||||
type RedisOptionsSource = Partial<RedisOptions> & {
|
type RedisOptionsSource = Partial<RedisOptions> & {
|
||||||
|
@ -62,7 +63,12 @@ type Source = {
|
||||||
scope?: 'local' | 'global' | string[];
|
scope?: 'local' | 'global' | string[];
|
||||||
};
|
};
|
||||||
sentryForBackend?: { options: Partial<Sentry.NodeOptions>; enableNodeProfiling: boolean; };
|
sentryForBackend?: { options: Partial<Sentry.NodeOptions>; enableNodeProfiling: boolean; };
|
||||||
sentryForFrontend?: { options: Partial<Sentry.NodeOptions> };
|
sentryForFrontend?: {
|
||||||
|
options: Partial<SentryVue.BrowserOptions> & { dsn: string };
|
||||||
|
vueIntegration?: SentryVue.VueIntegrationOptions | null;
|
||||||
|
browserTracingIntegration?: Parameters<typeof SentryVue.browserTracingIntegration>[0] | null;
|
||||||
|
replayIntegration?: Parameters<typeof SentryVue.replayIntegration>[0] | null;
|
||||||
|
};
|
||||||
|
|
||||||
publishTarballInsteadOfProvideRepositoryUrl?: boolean;
|
publishTarballInsteadOfProvideRepositoryUrl?: boolean;
|
||||||
|
|
||||||
|
@ -198,7 +204,12 @@ export type Config = {
|
||||||
redisForTimelines: RedisOptions & RedisOptionsSource;
|
redisForTimelines: RedisOptions & RedisOptionsSource;
|
||||||
redisForReactions: RedisOptions & RedisOptionsSource;
|
redisForReactions: RedisOptions & RedisOptionsSource;
|
||||||
sentryForBackend: { options: Partial<Sentry.NodeOptions>; enableNodeProfiling: boolean; } | undefined;
|
sentryForBackend: { options: Partial<Sentry.NodeOptions>; enableNodeProfiling: boolean; } | undefined;
|
||||||
sentryForFrontend: { options: Partial<Sentry.NodeOptions> } | undefined;
|
sentryForFrontend: {
|
||||||
|
options: Partial<SentryVue.BrowserOptions> & { dsn: string };
|
||||||
|
vueIntegration?: SentryVue.VueIntegrationOptions | null;
|
||||||
|
browserTracingIntegration?: Parameters<typeof SentryVue.browserTracingIntegration>[0] | null;
|
||||||
|
replayIntegration?: Parameters<typeof SentryVue.replayIntegration>[0] | null;
|
||||||
|
} | undefined;
|
||||||
perChannelMaxNoteCacheCount: number;
|
perChannelMaxNoteCacheCount: number;
|
||||||
perUserNotificationsMaxCount: number;
|
perUserNotificationsMaxCount: number;
|
||||||
deactivateAntennaThreshold: number;
|
deactivateAntennaThreshold: number;
|
||||||
|
|
|
@ -114,6 +114,8 @@ 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.hideNotesInSensitiveChannel && note.channel?.isSensitive) return false;
|
||||||
|
|
||||||
if (antenna.excludeBots && noteUser.isBot) return false;
|
if (antenna.excludeBots && noteUser.isBot) return false;
|
||||||
|
|
||||||
if (antenna.localOnly && noteUser.host != null) return false;
|
if (antenna.localOnly && noteUser.host != null) return false;
|
||||||
|
|
|
@ -532,7 +532,10 @@ export class NoteCreateService implements OnApplicationShutdown {
|
||||||
|
|
||||||
this.pushToTl(note, user);
|
this.pushToTl(note, user);
|
||||||
|
|
||||||
this.antennaService.addNoteToAntennas(note, user);
|
this.antennaService.addNoteToAntennas({
|
||||||
|
...note,
|
||||||
|
channel: data.channel ?? null,
|
||||||
|
}, user);
|
||||||
|
|
||||||
if (data.reply) {
|
if (data.reply) {
|
||||||
this.saveReply(data.reply, note);
|
this.saveReply(data.reply, note);
|
||||||
|
|
|
@ -41,6 +41,7 @@ export class AntennaEntityService {
|
||||||
excludeBots: antenna.excludeBots,
|
excludeBots: antenna.excludeBots,
|
||||||
withReplies: antenna.withReplies,
|
withReplies: antenna.withReplies,
|
||||||
withFile: antenna.withFile,
|
withFile: antenna.withFile,
|
||||||
|
hideNotesInSensitiveChannel: antenna.hideNotesInSensitiveChannel,
|
||||||
isActive: antenna.isActive,
|
isActive: antenna.isActive,
|
||||||
hasUnreadNote: false, // TODO
|
hasUnreadNote: false, // TODO
|
||||||
notify: false, // 後方互換性のため
|
notify: false, // 後方互換性のため
|
||||||
|
|
|
@ -127,6 +127,7 @@ export class MetaEntityService {
|
||||||
|
|
||||||
policies: { ...DEFAULT_POLICIES, ...instance.policies },
|
policies: { ...DEFAULT_POLICIES, ...instance.policies },
|
||||||
|
|
||||||
|
sentryForFrontend: this.config.sentryForFrontend ?? null,
|
||||||
mediaProxy: this.config.mediaProxy,
|
mediaProxy: this.config.mediaProxy,
|
||||||
enableUrlPreview: instance.urlPreviewEnabled,
|
enableUrlPreview: instance.urlPreviewEnabled,
|
||||||
noteSearchableScope: (this.config.meilisearch == null || this.config.meilisearch.scope !== 'local') ? 'global' : 'local',
|
noteSearchableScope: (this.config.meilisearch == null || this.config.meilisearch.scope !== 'local') ? 'global' : 'local',
|
||||||
|
|
|
@ -100,4 +100,9 @@ export class MiAntenna {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public localOnly: boolean;
|
public localOnly: boolean;
|
||||||
|
|
||||||
|
@Column('boolean', {
|
||||||
|
default: false,
|
||||||
|
})
|
||||||
|
public hideNotesInSensitiveChannel: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,5 +100,10 @@ export const packedAntennaSchema = {
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
hideNotesInSensitiveChannel: {
|
||||||
|
type: 'boolean',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
|
@ -211,6 +211,38 @@ export const packedMetaLiteSchema = {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
},
|
},
|
||||||
|
sentryForFrontend: {
|
||||||
|
type: 'object',
|
||||||
|
optional: false, nullable: true,
|
||||||
|
properties: {
|
||||||
|
options: {
|
||||||
|
type: 'object',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
properties: {
|
||||||
|
dsn: {
|
||||||
|
type: 'string',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
additionalProperties: true,
|
||||||
|
},
|
||||||
|
vueIntegration: {
|
||||||
|
type: 'object',
|
||||||
|
optional: true, nullable: true,
|
||||||
|
additionalProperties: true,
|
||||||
|
},
|
||||||
|
browserTracingIntegration: {
|
||||||
|
type: 'object',
|
||||||
|
optional: true, nullable: true,
|
||||||
|
additionalProperties: true,
|
||||||
|
},
|
||||||
|
replayIntegration: {
|
||||||
|
type: 'object',
|
||||||
|
optional: true, nullable: true,
|
||||||
|
additionalProperties: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
mediaProxy: {
|
mediaProxy: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
|
|
|
@ -73,6 +73,7 @@ export const paramDef = {
|
||||||
excludeBots: { type: 'boolean' },
|
excludeBots: { type: 'boolean' },
|
||||||
withReplies: { type: 'boolean' },
|
withReplies: { type: 'boolean' },
|
||||||
withFile: { type: 'boolean' },
|
withFile: { 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;
|
||||||
|
@ -133,6 +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,
|
||||||
|
hideNotesInSensitiveChannel: ps.hideNotesInSensitiveChannel,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.globalEventService.publishInternalEvent('antennaCreated', antenna);
|
this.globalEventService.publishInternalEvent('antennaCreated', antenna);
|
||||||
|
|
|
@ -108,6 +108,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
.leftJoinAndSelect('reply.user', 'replyUser')
|
.leftJoinAndSelect('reply.user', 'replyUser')
|
||||||
.leftJoinAndSelect('renote.user', 'renoteUser');
|
.leftJoinAndSelect('renote.user', 'renoteUser');
|
||||||
|
|
||||||
|
// NOTE: センシティブ除外の設定はこのエンドポイントでは無視する。
|
||||||
|
// https://github.com/misskey-dev/misskey/pull/15346#discussion_r1929950255
|
||||||
|
|
||||||
this.queryService.generateVisibilityQuery(query, me);
|
this.queryService.generateVisibilityQuery(query, me);
|
||||||
this.queryService.generateMutedUserQueryForNotes(query, me);
|
this.queryService.generateMutedUserQueryForNotes(query, me);
|
||||||
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
||||||
|
|
|
@ -72,6 +72,7 @@ export const paramDef = {
|
||||||
excludeBots: { type: 'boolean' },
|
excludeBots: { type: 'boolean' },
|
||||||
withReplies: { type: 'boolean' },
|
withReplies: { type: 'boolean' },
|
||||||
withFile: { type: 'boolean' },
|
withFile: { type: 'boolean' },
|
||||||
|
hideNotesInSensitiveChannel: { type: 'boolean' },
|
||||||
},
|
},
|
||||||
required: ['antennaId'],
|
required: ['antennaId'],
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -129,6 +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,
|
||||||
|
hideNotesInSensitiveChannel: ps.hideNotesInSensitiveChannel,
|
||||||
isActive: true,
|
isActive: true,
|
||||||
lastUsedAt: new Date(),
|
lastUsedAt: new Date(),
|
||||||
});
|
});
|
||||||
|
|
|
@ -146,6 +146,7 @@ describe('アンテナ', () => {
|
||||||
caseSensitive: false,
|
caseSensitive: false,
|
||||||
createdAt: new Date(response.createdAt).toISOString(),
|
createdAt: new Date(response.createdAt).toISOString(),
|
||||||
excludeKeywords: [['']],
|
excludeKeywords: [['']],
|
||||||
|
hideNotesInSensitiveChannel: false,
|
||||||
hasUnreadNote: false,
|
hasUnreadNote: false,
|
||||||
isActive: true,
|
isActive: true,
|
||||||
keywords: [['keyword']],
|
keywords: [['keyword']],
|
||||||
|
@ -217,6 +218,8 @@ describe('アンテナ', () => {
|
||||||
{ parameters: () => ({ withReplies: true }) },
|
{ parameters: () => ({ withReplies: true }) },
|
||||||
{ parameters: () => ({ withFile: false }) },
|
{ parameters: () => ({ withFile: false }) },
|
||||||
{ parameters: () => ({ withFile: true }) },
|
{ parameters: () => ({ withFile: true }) },
|
||||||
|
{ parameters: () => ({ hideNotesInSensitiveChannel: false }) },
|
||||||
|
{ parameters: () => ({ hideNotesInSensitiveChannel: true }) },
|
||||||
];
|
];
|
||||||
test.each(antennaParamPattern)('を作成できること($#)', async ({ parameters }) => {
|
test.each(antennaParamPattern)('を作成できること($#)', async ({ parameters }) => {
|
||||||
const response = await successfulApiCall({
|
const response = await successfulApiCall({
|
||||||
|
@ -626,6 +629,42 @@ describe('アンテナ', () => {
|
||||||
assert.deepStrictEqual(response, expected);
|
assert.deepStrictEqual(response, expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('が取得できること(センシティブチャンネルのノートを除く)', async () => {
|
||||||
|
const keyword = 'キーワード';
|
||||||
|
const antenna = await successfulApiCall({
|
||||||
|
endpoint: 'antennas/create',
|
||||||
|
parameters: { ...defaultParam, keywords: [[keyword]], hideNotesInSensitiveChannel: true },
|
||||||
|
user: alice,
|
||||||
|
});
|
||||||
|
const nonSensitiveChannel = await successfulApiCall({
|
||||||
|
endpoint: 'channels/create',
|
||||||
|
parameters: { name: 'test', isSensitive: false },
|
||||||
|
user: alice,
|
||||||
|
});
|
||||||
|
const sensitiveChannel = await successfulApiCall({
|
||||||
|
endpoint: 'channels/create',
|
||||||
|
parameters: { name: 'test', isSensitive: true },
|
||||||
|
user: alice,
|
||||||
|
});
|
||||||
|
|
||||||
|
const noteInLocal = await post(bob, { text: `test ${keyword}` });
|
||||||
|
const noteInNonSensitiveChannel = await post(bob, { text: `test ${keyword}`, channelId: nonSensitiveChannel.id });
|
||||||
|
await post(bob, { text: `test ${keyword}`, channelId: sensitiveChannel.id });
|
||||||
|
|
||||||
|
const response = await successfulApiCall({
|
||||||
|
endpoint: 'antennas/notes',
|
||||||
|
parameters: { antennaId: antenna.id },
|
||||||
|
user: alice,
|
||||||
|
});
|
||||||
|
// 最後に投稿したものが先頭に来る。
|
||||||
|
const expected = [
|
||||||
|
noteInNonSensitiveChannel,
|
||||||
|
noteInLocal,
|
||||||
|
];
|
||||||
|
assert.deepStrictEqual(response, expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
test.skip('が取得でき、日付指定のPaginationに一貫性があること', async () => { });
|
test.skip('が取得でき、日付指定のPaginationに一貫性があること', async () => { });
|
||||||
test.each([
|
test.each([
|
||||||
{ label: 'ID指定', offsetBy: 'id' },
|
{ label: 'ID指定', offsetBy: 'id' },
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
"@rollup/plugin-json": "6.1.0",
|
"@rollup/plugin-json": "6.1.0",
|
||||||
"@rollup/plugin-replace": "6.0.2",
|
"@rollup/plugin-replace": "6.0.2",
|
||||||
"@rollup/pluginutils": "5.1.4",
|
"@rollup/pluginutils": "5.1.4",
|
||||||
|
"@sentry/vue": "9.8.0",
|
||||||
"@syuilo/aiscript": "0.19.0",
|
"@syuilo/aiscript": "0.19.0",
|
||||||
"@tabler/icons-webfont": "3.31.0",
|
"@tabler/icons-webfont": "3.31.0",
|
||||||
"@twemoji/parser": "15.1.1",
|
"@twemoji/parser": "15.1.1",
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
import { computed, watch, version as vueVersion } from 'vue';
|
import { computed, watch, version as vueVersion } from 'vue';
|
||||||
import { compareVersions } from 'compare-versions';
|
import { compareVersions } from 'compare-versions';
|
||||||
import { version, lang, updateLocale, locale } from '@@/js/config.js';
|
import { version, lang, updateLocale, locale, apiUrl } from '@@/js/config.js';
|
||||||
import defaultLightTheme from '@@/themes/l-light.json5';
|
import defaultLightTheme from '@@/themes/l-light.json5';
|
||||||
import defaultDarkTheme from '@@/themes/d-green-lime.json5';
|
import defaultDarkTheme from '@@/themes/d-green-lime.json5';
|
||||||
import type { App } from 'vue';
|
import type { App } from 'vue';
|
||||||
|
@ -291,6 +291,41 @@ export async function common(createVue: () => Promise<App<Element>>) {
|
||||||
return root;
|
return root;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
if (instance.sentryForFrontend) {
|
||||||
|
const Sentry = await import('@sentry/vue');
|
||||||
|
Sentry.init({
|
||||||
|
app,
|
||||||
|
integrations: [
|
||||||
|
...(instance.sentryForFrontend.vueIntegration !== undefined ? [
|
||||||
|
Sentry.vueIntegration(instance.sentryForFrontend.vueIntegration ?? undefined),
|
||||||
|
] : []),
|
||||||
|
...(instance.sentryForFrontend.browserTracingIntegration !== undefined ? [
|
||||||
|
Sentry.browserTracingIntegration(instance.sentryForFrontend.browserTracingIntegration ?? undefined),
|
||||||
|
] : []),
|
||||||
|
...(instance.sentryForFrontend.replayIntegration !== undefined ? [
|
||||||
|
Sentry.replayIntegration(instance.sentryForFrontend.replayIntegration ?? undefined),
|
||||||
|
] : []),
|
||||||
|
],
|
||||||
|
|
||||||
|
// Set tracesSampleRate to 1.0 to capture 100%
|
||||||
|
tracesSampleRate: 1.0,
|
||||||
|
|
||||||
|
// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
|
||||||
|
...(instance.sentryForFrontend.browserTracingIntegration !== undefined ? {
|
||||||
|
tracePropagationTargets: [apiUrl],
|
||||||
|
} : {}),
|
||||||
|
|
||||||
|
// Capture Replay for 10% of all sessions,
|
||||||
|
// plus for 100% of sessions with an error
|
||||||
|
...(instance.sentryForFrontend.replayIntegration !== undefined ? {
|
||||||
|
replaysSessionSampleRate: 0.1,
|
||||||
|
replaysOnErrorSampleRate: 1.0,
|
||||||
|
} : {}),
|
||||||
|
|
||||||
|
...instance.sentryForFrontend.options,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
app.mount(rootEl);
|
app.mount(rootEl);
|
||||||
|
|
||||||
// boot.jsのやつを解除
|
// boot.jsのやつを解除
|
||||||
|
|
|
@ -39,6 +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="hideNotesInSensitiveChannel">{{ i18n.ts.hideNotesInSensitiveChannel }}</MkSwitch>
|
||||||
</div>
|
</div>
|
||||||
<div :class="$style.actions">
|
<div :class="$style.actions">
|
||||||
<div class="_buttons">
|
<div class="_buttons">
|
||||||
|
@ -86,6 +87,7 @@ const initialAntenna = deepMerge<PartialAllowedAntenna>(props.antenna ?? {}, {
|
||||||
caseSensitive: false,
|
caseSensitive: false,
|
||||||
localOnly: false,
|
localOnly: false,
|
||||||
withFile: false,
|
withFile: false,
|
||||||
|
hideNotesInSensitiveChannel: false,
|
||||||
isActive: true,
|
isActive: true,
|
||||||
hasUnreadNote: false,
|
hasUnreadNote: false,
|
||||||
notify: false,
|
notify: false,
|
||||||
|
@ -108,6 +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 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 () => {
|
||||||
|
@ -124,6 +127,7 @@ async function saveAntenna() {
|
||||||
excludeBots: excludeBots.value,
|
excludeBots: excludeBots.value,
|
||||||
withReplies: withReplies.value,
|
withReplies: withReplies.value,
|
||||||
withFile: withFile.value,
|
withFile: withFile.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()),
|
||||||
|
|
|
@ -4898,6 +4898,8 @@ export type components = {
|
||||||
hasUnreadNote: boolean;
|
hasUnreadNote: boolean;
|
||||||
/** @default false */
|
/** @default false */
|
||||||
notify: boolean;
|
notify: boolean;
|
||||||
|
/** @default false */
|
||||||
|
hideNotesInSensitiveChannel: boolean;
|
||||||
};
|
};
|
||||||
Clip: {
|
Clip: {
|
||||||
/**
|
/**
|
||||||
|
@ -5309,6 +5311,21 @@ export type components = {
|
||||||
enableEmail: boolean;
|
enableEmail: boolean;
|
||||||
enableServiceWorker: boolean;
|
enableServiceWorker: boolean;
|
||||||
translatorAvailable: boolean;
|
translatorAvailable: boolean;
|
||||||
|
sentryForFrontend: ({
|
||||||
|
options: {
|
||||||
|
dsn: string;
|
||||||
|
[key: string]: unknown;
|
||||||
|
};
|
||||||
|
vueIntegration?: {
|
||||||
|
[key: string]: unknown;
|
||||||
|
} | null;
|
||||||
|
browserTracingIntegration?: {
|
||||||
|
[key: string]: unknown;
|
||||||
|
} | null;
|
||||||
|
replayIntegration?: {
|
||||||
|
[key: string]: unknown;
|
||||||
|
} | null;
|
||||||
|
}) | null;
|
||||||
mediaProxy: string;
|
mediaProxy: string;
|
||||||
enableUrlPreview: boolean;
|
enableUrlPreview: boolean;
|
||||||
backgroundImageUrl: string | null;
|
backgroundImageUrl: string | null;
|
||||||
|
@ -11290,6 +11307,7 @@ export type operations = {
|
||||||
excludeBots?: boolean;
|
excludeBots?: boolean;
|
||||||
withReplies: boolean;
|
withReplies: boolean;
|
||||||
withFile: boolean;
|
withFile: boolean;
|
||||||
|
hideNotesInSensitiveChannel?: boolean;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -11571,6 +11589,7 @@ export type operations = {
|
||||||
excludeBots?: boolean;
|
excludeBots?: boolean;
|
||||||
withReplies?: boolean;
|
withReplies?: boolean;
|
||||||
withFile?: boolean;
|
withFile?: boolean;
|
||||||
|
hideNotesInSensitiveChannel?: boolean;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
74
pnpm-lock.yaml
generated
74
pnpm-lock.yaml
generated
|
@ -444,6 +444,9 @@ importers:
|
||||||
'@nestjs/platform-express':
|
'@nestjs/platform-express':
|
||||||
specifier: 10.4.15
|
specifier: 10.4.15
|
||||||
version: 10.4.15(@nestjs/common@11.0.12(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.0.12)
|
version: 10.4.15(@nestjs/common@11.0.12(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.0.12)
|
||||||
|
'@sentry/vue':
|
||||||
|
specifier: 9.8.0
|
||||||
|
version: 9.8.0(vue@3.5.13(typescript@5.8.2))
|
||||||
'@simplewebauthn/types':
|
'@simplewebauthn/types':
|
||||||
specifier: 12.0.0
|
specifier: 12.0.0
|
||||||
version: 12.0.0
|
version: 12.0.0
|
||||||
|
@ -709,6 +712,9 @@ importers:
|
||||||
'@rollup/pluginutils':
|
'@rollup/pluginutils':
|
||||||
specifier: 5.1.4
|
specifier: 5.1.4
|
||||||
version: 5.1.4(rollup@4.36.0)
|
version: 5.1.4(rollup@4.36.0)
|
||||||
|
'@sentry/vue':
|
||||||
|
specifier: 9.8.0
|
||||||
|
version: 9.8.0(vue@3.5.13(typescript@5.8.2))
|
||||||
'@syuilo/aiscript':
|
'@syuilo/aiscript':
|
||||||
specifier: 0.19.0
|
specifier: 0.19.0
|
||||||
version: 0.19.0
|
version: 0.19.0
|
||||||
|
@ -3555,10 +3561,34 @@ packages:
|
||||||
'@sec-ant/readable-stream@0.4.1':
|
'@sec-ant/readable-stream@0.4.1':
|
||||||
resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==}
|
resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==}
|
||||||
|
|
||||||
|
'@sentry-internal/browser-utils@9.8.0':
|
||||||
|
resolution: {integrity: sha512-7aQDeU9ogMLKnEBFM/vvgMMgZDkfMhoZCtX8kq65gn33L4X2B8sI5oyUj2QJtXaRSsiUjbdCaquDLqZBCaLQHA==}
|
||||||
|
engines: {node: '>=18'}
|
||||||
|
|
||||||
|
'@sentry-internal/feedback@9.8.0':
|
||||||
|
resolution: {integrity: sha512-xWiCJkD8ROuy2pnojuRLcLI6sezK399gasA5ZL4MCXdkryqZYs55Ef2Ofj4z0RdUc8gMUb81+LTqwbmbfTqNlQ==}
|
||||||
|
engines: {node: '>=18'}
|
||||||
|
|
||||||
|
'@sentry-internal/replay-canvas@9.8.0':
|
||||||
|
resolution: {integrity: sha512-/6ELOnyCOItvqv2Os29JhE8ydDds3xibMQ+FomsSkClQdC4bbc/L74nm/fdXVpJkMswtjksiTwZo1nYTS3JsIw==}
|
||||||
|
engines: {node: '>=18'}
|
||||||
|
|
||||||
|
'@sentry-internal/replay@9.8.0':
|
||||||
|
resolution: {integrity: sha512-YJhhNnrsufYVIX9s5lNSFFQrBJjUtn5AxvrcnN0fvLymNg3Y73GOUpFmhTxyELjQneKiOViClxjoWSVAN7sqQA==}
|
||||||
|
engines: {node: '>=18'}
|
||||||
|
|
||||||
|
'@sentry/browser@9.8.0':
|
||||||
|
resolution: {integrity: sha512-iFM4PGLc6qCb0GaHnA5Uy09k25RXVSepAgS574cm1CH7II1wrRjTozKnPKROW89WDMuxoTOL7Tk7qPGCyWmA4g==}
|
||||||
|
engines: {node: '>=18'}
|
||||||
|
|
||||||
'@sentry/core@8.55.0':
|
'@sentry/core@8.55.0':
|
||||||
resolution: {integrity: sha512-6g7jpbefjHYs821Z+EBJ8r4Z7LT5h80YSWRJaylGS4nW5W5Z2KXzpdnyFarv37O7QjauzVC2E+PABmpkw5/JGA==}
|
resolution: {integrity: sha512-6g7jpbefjHYs821Z+EBJ8r4Z7LT5h80YSWRJaylGS4nW5W5Z2KXzpdnyFarv37O7QjauzVC2E+PABmpkw5/JGA==}
|
||||||
engines: {node: '>=14.18'}
|
engines: {node: '>=14.18'}
|
||||||
|
|
||||||
|
'@sentry/core@9.8.0':
|
||||||
|
resolution: {integrity: sha512-EnN2yLWCbWjooWBPzwlXdZoJG/Bqn3ymbuXX++DUJuBGjSmtixQeTf/hKeVzj4zbib3BbbYsNBasRVjq8Rk5ng==}
|
||||||
|
engines: {node: '>=18'}
|
||||||
|
|
||||||
'@sentry/node@8.55.0':
|
'@sentry/node@8.55.0':
|
||||||
resolution: {integrity: sha512-h10LJLDTRAzYgay60Oy7moMookqqSZSviCWkkmHZyaDn+4WURnPp5SKhhfrzPRQcXKrweiOwDSHBgn1tweDssg==}
|
resolution: {integrity: sha512-h10LJLDTRAzYgay60Oy7moMookqqSZSviCWkkmHZyaDn+4WURnPp5SKhhfrzPRQcXKrweiOwDSHBgn1tweDssg==}
|
||||||
engines: {node: '>=14.18'}
|
engines: {node: '>=14.18'}
|
||||||
|
@ -3579,6 +3609,16 @@ packages:
|
||||||
engines: {node: '>=14.18'}
|
engines: {node: '>=14.18'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
|
'@sentry/vue@9.8.0':
|
||||||
|
resolution: {integrity: sha512-E+27lL+aU8HjDo3DD3TlgStTIxBZHVqz6jZcL0/tig/JldpFRetO77terRHNfSVlPc0m3aNXuARu7G438f7ZlQ==}
|
||||||
|
engines: {node: '>=18'}
|
||||||
|
peerDependencies:
|
||||||
|
pinia: 2.x || 3.x
|
||||||
|
vue: 2.x || 3.x
|
||||||
|
peerDependenciesMeta:
|
||||||
|
pinia:
|
||||||
|
optional: true
|
||||||
|
|
||||||
'@shikijs/core@3.2.1':
|
'@shikijs/core@3.2.1':
|
||||||
resolution: {integrity: sha512-FhsdxMWYu/C11sFisEp7FMGBtX/OSSbnXZDMBhGuUDBNTdsoZlMSgQv5f90rwvzWAdWIW6VobD+G3IrazxA6dQ==}
|
resolution: {integrity: sha512-FhsdxMWYu/C11sFisEp7FMGBtX/OSSbnXZDMBhGuUDBNTdsoZlMSgQv5f90rwvzWAdWIW6VobD+G3IrazxA6dQ==}
|
||||||
|
|
||||||
|
@ -13629,8 +13669,36 @@ snapshots:
|
||||||
|
|
||||||
'@sec-ant/readable-stream@0.4.1': {}
|
'@sec-ant/readable-stream@0.4.1': {}
|
||||||
|
|
||||||
|
'@sentry-internal/browser-utils@9.8.0':
|
||||||
|
dependencies:
|
||||||
|
'@sentry/core': 9.8.0
|
||||||
|
|
||||||
|
'@sentry-internal/feedback@9.8.0':
|
||||||
|
dependencies:
|
||||||
|
'@sentry/core': 9.8.0
|
||||||
|
|
||||||
|
'@sentry-internal/replay-canvas@9.8.0':
|
||||||
|
dependencies:
|
||||||
|
'@sentry-internal/replay': 9.8.0
|
||||||
|
'@sentry/core': 9.8.0
|
||||||
|
|
||||||
|
'@sentry-internal/replay@9.8.0':
|
||||||
|
dependencies:
|
||||||
|
'@sentry-internal/browser-utils': 9.8.0
|
||||||
|
'@sentry/core': 9.8.0
|
||||||
|
|
||||||
|
'@sentry/browser@9.8.0':
|
||||||
|
dependencies:
|
||||||
|
'@sentry-internal/browser-utils': 9.8.0
|
||||||
|
'@sentry-internal/feedback': 9.8.0
|
||||||
|
'@sentry-internal/replay': 9.8.0
|
||||||
|
'@sentry-internal/replay-canvas': 9.8.0
|
||||||
|
'@sentry/core': 9.8.0
|
||||||
|
|
||||||
'@sentry/core@8.55.0': {}
|
'@sentry/core@8.55.0': {}
|
||||||
|
|
||||||
|
'@sentry/core@9.8.0': {}
|
||||||
|
|
||||||
'@sentry/node@8.55.0':
|
'@sentry/node@8.55.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@opentelemetry/api': 1.9.0
|
'@opentelemetry/api': 1.9.0
|
||||||
|
@ -13690,6 +13758,12 @@ snapshots:
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
|
'@sentry/vue@9.8.0(vue@3.5.13(typescript@5.8.2))':
|
||||||
|
dependencies:
|
||||||
|
'@sentry/browser': 9.8.0
|
||||||
|
'@sentry/core': 9.8.0
|
||||||
|
vue: 3.5.13(typescript@5.8.2)
|
||||||
|
|
||||||
'@shikijs/core@3.2.1':
|
'@shikijs/core@3.2.1':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@shikijs/types': 3.2.1
|
'@shikijs/types': 3.2.1
|
||||||
|
|
Loading…
Add table
Reference in a new issue