Compare commits
42 Commits
2023.9.0-r
...
2023.9.0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f32915b515 | ||
![]() |
281369d8c5 | ||
![]() |
65aef45050 | ||
![]() |
48314a39e0 | ||
![]() |
fe570fe16b | ||
![]() |
cf573add27 | ||
![]() |
4a7f6e6de4 | ||
![]() |
00659220a5 | ||
![]() |
51546ad1ce | ||
![]() |
80d52f65eb | ||
![]() |
841e6ff901 | ||
![]() |
82a51d49a0 | ||
![]() |
30b231225c | ||
![]() |
d05563c448 | ||
![]() |
03c868b727 | ||
![]() |
a8d45d4b0d | ||
![]() |
4e24aff408 | ||
![]() |
e64a81aa1d | ||
![]() |
7093662ce5 | ||
![]() |
32c741154d | ||
![]() |
407a965c1d | ||
![]() |
de6348e8a0 | ||
![]() |
9ad57324db | ||
![]() |
94690c835e | ||
![]() |
c5d2dba28d | ||
![]() |
272e0c874f | ||
![]() |
d429f810a9 | ||
![]() |
75b28d6782 | ||
![]() |
8b1362ab03 | ||
![]() |
a096f621cf | ||
![]() |
f54a9542bb | ||
![]() |
a52bbc7c8d | ||
![]() |
59768bdf3f | ||
![]() |
1e67e9c661 | ||
![]() |
ae517a99a7 | ||
![]() |
b23a9b1a88 | ||
![]() |
5bd68aa3e0 | ||
![]() |
647ce174b3 | ||
![]() |
02c8fd9de5 | ||
![]() |
1ba49b614d | ||
![]() |
40de14415c | ||
![]() |
7c9330a02f |
@@ -86,6 +86,7 @@
|
||||
- Fix: 複数の階層があるメニューで、短くタップすると正常に動かない場合がある問題を修正
|
||||
- Fix: アニメーションがオフのとき、スマホで子メニューの選択ができない問題を修正
|
||||
- Fix: ドロワーメニューで、親メニュー項目をマウスでホバーすると子メニューが表示されてしまう問題を修正
|
||||
- Fix: AiScriptでMk:apiが外部と通信できる問題を修正
|
||||
|
||||
### Server
|
||||
- Change: cacheRemoteFilesの初期値はfalseになりました
|
||||
@@ -96,6 +97,7 @@
|
||||
- Enhance: nodeinfo 2.1対応
|
||||
- Enhance: 自分へのメンション一覧を取得する際のパフォーマンスを向上
|
||||
- Enhance: Docker環境でjemallocを使用することでメモリ使用量を削減
|
||||
- Enhance: ID生成方式としてaidxを追加、かつデフォルトに
|
||||
- Fix: MK_ONLY_SERVERオプションを指定した際にクラッシュする問題を修正
|
||||
- Fix: notes/reactionsのページネーションが機能しない問題を修正
|
||||
- Fix: ノート検索 `notes/search` にてhostを指定した際に検索結果に反映されるように
|
||||
|
@@ -2107,12 +2107,20 @@ _moderationLogTypes:
|
||||
suspend: "Gesperrt"
|
||||
unsuspend: "Entsperrt"
|
||||
addCustomEmoji: "Benutzerdefiniertes Emoji hinzugefügt"
|
||||
updateCustomEmoji: "Benutzerdefiniertes Emoji aktualisiert"
|
||||
deleteCustomEmoji: "Benutzerdefiniertes Emoji gelöscht"
|
||||
updateServerSettings: "Servereinstellungen aktualisiert"
|
||||
updateUserNote: "Moderationsnotiz aktualisiert"
|
||||
deleteDriveFile: "Datei gelöscht"
|
||||
deleteNote: "Notiz gelöscht"
|
||||
createGlobalAnnouncement: "Globale Ankündigung erstellt"
|
||||
createUserAnnouncement: "Benutzerankündigung erstellt"
|
||||
createUserAnnouncement: "Benutzerspezifische Ankündigung erstellt"
|
||||
updateGlobalAnnouncement: "Globale Ankündigung aktualisiert"
|
||||
updateUserAnnouncement: "Benutzerspezifische Ankündigung aktualisiert"
|
||||
deleteGlobalAnnouncement: "Globale Ankündigung gelöscht"
|
||||
deleteUserAnnouncement: "Benutzerspezifische Ankündigung gelöscht"
|
||||
resetPassword: "Passwort zurückgesetzt"
|
||||
suspendRemoteInstance: "Fremde Instanz gesperrt"
|
||||
unsuspendRemoteInstance: "Fremde Instanz entsperrt"
|
||||
markSensitiveDriveFile: "Datei als sensitiv markiert"
|
||||
unmarkSensitiveDriveFile: "Datei als nicht sensitiv markiert"
|
||||
|
@@ -2107,12 +2107,20 @@ _moderationLogTypes:
|
||||
suspend: "Suspended"
|
||||
unsuspend: "Unsuspended"
|
||||
addCustomEmoji: "Custom emoji added"
|
||||
updateCustomEmoji: "Custom emoji updated"
|
||||
deleteCustomEmoji: "Custom emoji deleted"
|
||||
updateServerSettings: "Server settings updated"
|
||||
updateUserNote: "Moderation note updated"
|
||||
deleteDriveFile: "File deleted"
|
||||
deleteNote: "Note deleted"
|
||||
createGlobalAnnouncement: "Global announcement created"
|
||||
createUserAnnouncement: "User announcement created"
|
||||
updateGlobalAnnouncement: "Global announcement updated"
|
||||
updateUserAnnouncement: "User announcement updated"
|
||||
deleteGlobalAnnouncement: "Global announcement deleted"
|
||||
deleteUserAnnouncement: "User announcement deleted"
|
||||
resetPassword: "Password reset"
|
||||
suspendRemoteInstance: "Remote instance suspended"
|
||||
unsuspendRemoteInstance: "Remote instance unsuspended"
|
||||
markSensitiveDriveFile: "File marked as sensitive"
|
||||
unmarkSensitiveDriveFile: "File unmarked as sensitive"
|
||||
|
2
locales/index.d.ts
vendored
2
locales/index.d.ts
vendored
@@ -2271,6 +2271,8 @@ export interface Locale {
|
||||
"resetPassword": string;
|
||||
"suspendRemoteInstance": string;
|
||||
"unsuspendRemoteInstance": string;
|
||||
"markSensitiveDriveFile": string;
|
||||
"unmarkSensitiveDriveFile": string;
|
||||
};
|
||||
}
|
||||
declare const locales: {
|
||||
|
@@ -2184,3 +2184,5 @@ _moderationLogTypes:
|
||||
resetPassword: "パスワードをリセット"
|
||||
suspendRemoteInstance: "リモートサーバーを停止"
|
||||
unsuspendRemoteInstance: "リモートサーバーを再開"
|
||||
markSensitiveDriveFile: "ファイルをセンシティブ付与"
|
||||
unmarkSensitiveDriveFile: "ファイルをセンシティブ解除"
|
||||
|
@@ -2107,10 +2107,18 @@ _moderationLogTypes:
|
||||
suspend: "冻结"
|
||||
unsuspend: "解除冻结"
|
||||
addCustomEmoji: "添加自定义表情符号"
|
||||
updateCustomEmoji: "更新自定义表情符号"
|
||||
deleteCustomEmoji: "删除自定义表情符号"
|
||||
updateServerSettings: "更新服务器设置"
|
||||
updateUserNote: "更新管理笔记"
|
||||
deleteDriveFile: "删除文件"
|
||||
deleteNote: "删除帖子"
|
||||
createGlobalAnnouncement: "创建全体通知"
|
||||
createUserAnnouncement: "创建用户通知"
|
||||
updateGlobalAnnouncement: "更新全体通知"
|
||||
updateUserAnnouncement: "更新用户通知"
|
||||
deleteGlobalAnnouncement: "删除全体通知"
|
||||
deleteUserAnnouncement: "删除用户通知"
|
||||
resetPassword: "重置密码"
|
||||
markSensitiveDriveFile: "标记网盘文件为敏感媒体"
|
||||
unmarkSensitiveDriveFile: "取消标记网盘文件为敏感媒体"
|
||||
|
@@ -2107,12 +2107,18 @@ _moderationLogTypes:
|
||||
suspend: "凍結"
|
||||
unsuspend: "解除凍結"
|
||||
addCustomEmoji: "新增自訂表情符號"
|
||||
updateCustomEmoji: "更新自訂表情符號"
|
||||
deleteCustomEmoji: "刪除自訂表情符號"
|
||||
updateServerSettings: "更新伺服器設定"
|
||||
updateUserNote: "更新管理筆記"
|
||||
deleteDriveFile: "刪除檔案"
|
||||
deleteNote: "刪除貼文"
|
||||
createGlobalAnnouncement: "建立全網通知"
|
||||
createUserAnnouncement: "建立使用者通知"
|
||||
updateGlobalAnnouncement: "更新全部的公告"
|
||||
updateUserAnnouncement: "更新使用者的公告"
|
||||
deleteGlobalAnnouncement: "刪除全部的公告"
|
||||
deleteUserAnnouncement: "刪除使用者的公告"
|
||||
resetPassword: "重設密碼"
|
||||
suspendRemoteInstance: "封鎖遠端伺服器"
|
||||
unsuspendRemoteInstance: "解除封鎖遠端伺服器"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "misskey",
|
||||
"version": "2023.9.0-rc.3",
|
||||
"version": "2023.9.0",
|
||||
"codename": "nasubi",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@@ -87,6 +87,9 @@ type UploadFromUrlArgs = {
|
||||
|
||||
@Injectable()
|
||||
export class DriveService {
|
||||
public static NoSuchFolderError = class extends Error {};
|
||||
public static InvalidFileNameError = class extends Error {};
|
||||
public static CannotUnmarkSensitiveError = class extends Error {};
|
||||
private registerLogger: Logger;
|
||||
private downloaderLogger: Logger;
|
||||
private deleteLogger: Logger;
|
||||
@@ -649,6 +652,57 @@ export class DriveService {
|
||||
return file;
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async updateFile(file: MiDriveFile, values: Partial<MiDriveFile>, updater: MiUser) {
|
||||
const alwaysMarkNsfw = (await this.roleService.getUserPolicies(file.userId)).alwaysMarkNsfw;
|
||||
|
||||
if (values.name && !this.driveFileEntityService.validateFileName(file.name)) {
|
||||
throw new DriveService.InvalidFileNameError();
|
||||
}
|
||||
|
||||
if (values.isSensitive !== undefined && values.isSensitive !== file.isSensitive && alwaysMarkNsfw && !values.isSensitive) {
|
||||
throw new DriveService.CannotUnmarkSensitiveError();
|
||||
}
|
||||
|
||||
if (values.folderId != null) {
|
||||
const folder = await this.driveFoldersRepository.findOneBy({
|
||||
id: values.folderId,
|
||||
userId: file.userId!,
|
||||
});
|
||||
|
||||
if (folder == null) {
|
||||
throw new DriveService.NoSuchFolderError();
|
||||
}
|
||||
}
|
||||
|
||||
await this.driveFilesRepository.update(file.id, values);
|
||||
|
||||
const fileObj = await this.driveFileEntityService.pack(file.id, { self: true });
|
||||
|
||||
// Publish fileUpdated event
|
||||
if (file.userId) {
|
||||
this.globalEventService.publishDriveStream(file.userId, 'fileUpdated', fileObj);
|
||||
}
|
||||
|
||||
if (await this.roleService.isModerator(updater) && (file.userId !== updater.id)) {
|
||||
if (values.isSensitive !== undefined && values.isSensitive !== file.isSensitive) {
|
||||
if (values.isSensitive) {
|
||||
this.moderationLogService.log(updater, 'markSensitiveDriveFile', {
|
||||
fileId: file.id,
|
||||
fileUserId: file.userId,
|
||||
});
|
||||
} else {
|
||||
this.moderationLogService.log(updater, 'unmarkSensitiveDriveFile', {
|
||||
fileId: file.id,
|
||||
fileUserId: file.userId,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return fileObj;
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async deleteFile(file: MiDriveFile, isExpired = false, deleter?: MiUser) {
|
||||
if (file.storedInternal) {
|
||||
|
@@ -4,12 +4,11 @@
|
||||
*/
|
||||
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import type { DriveFilesRepository, DriveFoldersRepository } from '@/models/_.js';
|
||||
import type { DriveFilesRepository } from '@/models/_.js';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import { DriveFileEntityService } from '@/core/entities/DriveFileEntityService.js';
|
||||
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { RoleService } from '@/core/RoleService.js';
|
||||
import { DriveService } from '@/core/DriveService.js';
|
||||
import { ApiError } from '../../../error.js';
|
||||
|
||||
export const meta = {
|
||||
@@ -77,16 +76,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
@Inject(DI.driveFilesRepository)
|
||||
private driveFilesRepository: DriveFilesRepository,
|
||||
|
||||
@Inject(DI.driveFoldersRepository)
|
||||
private driveFoldersRepository: DriveFoldersRepository,
|
||||
|
||||
private driveFileEntityService: DriveFileEntityService,
|
||||
private driveService: DriveService,
|
||||
private roleService: RoleService,
|
||||
private globalEventService: GlobalEventService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const file = await this.driveFilesRepository.findOneBy({ id: ps.fileId });
|
||||
const alwaysMarkNsfw = (await this.roleService.getUserPolicies(me.id)).alwaysMarkNsfw;
|
||||
if (file == null) {
|
||||
throw new ApiError(meta.errors.noSuchFile);
|
||||
}
|
||||
@@ -95,49 +89,28 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
throw new ApiError(meta.errors.accessDenied);
|
||||
}
|
||||
|
||||
if (ps.name) file.name = ps.name;
|
||||
if (!this.driveFileEntityService.validateFileName(file.name)) {
|
||||
throw new ApiError(meta.errors.invalidFileName);
|
||||
}
|
||||
let packedFile;
|
||||
|
||||
if (ps.comment !== undefined) file.comment = ps.comment;
|
||||
|
||||
if (ps.isSensitive !== undefined && ps.isSensitive !== file.isSensitive && alwaysMarkNsfw && !ps.isSensitive) {
|
||||
throw new ApiError(meta.errors.restrictedByRole);
|
||||
}
|
||||
|
||||
if (ps.isSensitive !== undefined) file.isSensitive = ps.isSensitive;
|
||||
|
||||
if (ps.folderId !== undefined) {
|
||||
if (ps.folderId === null) {
|
||||
file.folderId = null;
|
||||
try {
|
||||
packedFile = await this.driveService.updateFile(file, {
|
||||
folderId: ps.folderId,
|
||||
name: ps.name,
|
||||
isSensitive: ps.isSensitive,
|
||||
comment: ps.comment,
|
||||
}, me);
|
||||
} catch (e) {
|
||||
if (e instanceof DriveService.InvalidFileNameError) {
|
||||
throw new ApiError(meta.errors.invalidFileName);
|
||||
} else if (e instanceof DriveService.NoSuchFolderError) {
|
||||
throw new ApiError(meta.errors.noSuchFolder);
|
||||
} else if (e instanceof DriveService.CannotUnmarkSensitiveError) {
|
||||
throw new ApiError(meta.errors.restrictedByRole);
|
||||
} else {
|
||||
const folder = await this.driveFoldersRepository.findOneBy({
|
||||
id: ps.folderId,
|
||||
userId: me.id,
|
||||
});
|
||||
|
||||
if (folder == null) {
|
||||
throw new ApiError(meta.errors.noSuchFolder);
|
||||
}
|
||||
|
||||
file.folderId = folder.id;
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
await this.driveFilesRepository.update(file.id, {
|
||||
name: file.name,
|
||||
comment: file.comment,
|
||||
folderId: file.folderId,
|
||||
isSensitive: file.isSensitive,
|
||||
});
|
||||
|
||||
const fileObj = await this.driveFileEntityService.pack(file, { self: true });
|
||||
|
||||
// Publish fileUpdated event
|
||||
this.globalEventService.publishDriveStream(me.id, 'fileUpdated', fileObj);
|
||||
|
||||
return fileObj;
|
||||
return packedFile;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@@ -75,6 +75,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
summary: ps.summary,
|
||||
script: ps.script,
|
||||
permissions: ps.permissions,
|
||||
visibility: ps.visibility,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@@ -52,6 +52,8 @@ export const moderationLogTypes = [
|
||||
'resetPassword',
|
||||
'suspendRemoteInstance',
|
||||
'unsuspendRemoteInstance',
|
||||
'markSensitiveDriveFile',
|
||||
'unmarkSensitiveDriveFile',
|
||||
] as const;
|
||||
|
||||
export type ModerationLogPayloads = {
|
||||
@@ -152,4 +154,12 @@ export type ModerationLogPayloads = {
|
||||
id: string;
|
||||
host: string;
|
||||
};
|
||||
markSensitiveDriveFile: {
|
||||
fileId: string;
|
||||
fileUserId: string | null;
|
||||
};
|
||||
unmarkSensitiveDriveFile: {
|
||||
fileId: string;
|
||||
fileUserId: string | null;
|
||||
};
|
||||
};
|
||||
|
@@ -70,6 +70,7 @@
|
||||
"twemoji-parser": "14.0.0",
|
||||
"typescript": "5.2.2",
|
||||
"uuid": "9.0.1",
|
||||
"v-code-diff": "^1.7.1",
|
||||
"vanilla-tilt": "1.8.1",
|
||||
"vite": "4.4.9",
|
||||
"vue": "3.3.4",
|
||||
|
@@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<MkPagination ref="pagingComponent" :pagination="pagination">
|
||||
<MkPagination ref="pagingComponent" :pagination="pagination" :disableAutoLoad="disableAutoLoad">
|
||||
<template #empty>
|
||||
<div class="_fullinfo">
|
||||
<img :src="infoImageUrl" class="_ghost"/>
|
||||
@@ -42,6 +42,7 @@ import { infoImageUrl } from '@/instance.js';
|
||||
const props = defineProps<{
|
||||
pagination: Paging;
|
||||
noGap?: boolean;
|
||||
disableAutoLoad?: boolean;
|
||||
}>();
|
||||
|
||||
const pagingComponent = shallowRef<InstanceType<typeof MkPagination>>();
|
||||
|
@@ -16,7 +16,18 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<div :class="$style.root">
|
||||
<div>{{ i18n.ts.moderator }}: {{ log.userId }}</div>
|
||||
|
||||
<template v-if="log.type === 'suspend'">
|
||||
<template v-if="log.type === 'updateServerSettings'">
|
||||
<div :class="$style.diff">
|
||||
<CodeDiff :oldString="JSON5.stringify(log.info.before, null, '\t')" :newString="JSON5.stringify(log.info.after, null, '\t')" language="javascript" maxHeight="300px"/>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="log.type === 'updateUserNote'">
|
||||
<div>{{ i18n.ts.user }}: {{ log.info.userId }}</div>
|
||||
<div :class="$style.diff">
|
||||
<CodeDiff :oldString="log.info.before ?? ''" :newString="log.info.after ?? ''" maxHeight="300px"/>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="log.type === 'suspend'">
|
||||
<div>{{ i18n.ts.user }}: {{ log.info.targetId }}</div>
|
||||
</template>
|
||||
<template v-else-if="log.type === 'unsuspend'">
|
||||
@@ -36,6 +47,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
<script lang="ts" setup>
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { CodeDiff } from 'v-code-diff';
|
||||
import JSON5 from 'json5';
|
||||
import * as os from '@/os.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { dateString } from '@/filters/date.js';
|
||||
@@ -54,4 +67,11 @@ const props = defineProps<{
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.diff {
|
||||
background: #fff;
|
||||
color: #000;
|
||||
border-radius: 6px;
|
||||
overflow: clip;
|
||||
}
|
||||
</style>
|
||||
|
@@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<MkSelect v-model="type" style="margin: 0; flex: 1;">
|
||||
<template #label>{{ i18n.ts.type }}</template>
|
||||
<option :value="null">{{ i18n.ts.all }}</option>
|
||||
<option v-for="t in Misskey.moderationLogTypes" :key="t" :value="t">{{ t }}</option>
|
||||
<option v-for="t in Misskey.moderationLogTypes" :key="t" :value="t">{{ i18n.ts._moderationLogTypes[t] ?? t }}</option>
|
||||
</MkSelect>
|
||||
<MkInput v-model="moderatorId" style="margin: 0; flex: 1;">
|
||||
<template #label>{{ i18n.ts.moderator }}(ID)</template>
|
||||
|
@@ -11,7 +11,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<Transition :name="defaultStore.state.animation ? 'fade' : ''" mode="out-in">
|
||||
<div v-if="note">
|
||||
<div v-if="showNext" class="_margin">
|
||||
<MkNotes class="" :pagination="nextPagination" :noGap="true"/>
|
||||
<MkNotes class="" :pagination="nextPagination" :noGap="true" :disableAutoLoad="true"/>
|
||||
</div>
|
||||
|
||||
<div class="_margin">
|
||||
|
@@ -34,12 +34,15 @@ export function createAiScriptEnv(opts) {
|
||||
return confirm.canceled ? values.FALSE : values.TRUE;
|
||||
}),
|
||||
'Mk:api': values.FN_NATIVE(async ([ep, param, token]) => {
|
||||
utils.assertString(ep);
|
||||
if (ep.value.includes('://')) throw new Error('invalid endpoint');
|
||||
if (token) {
|
||||
utils.assertString(token);
|
||||
// バグがあればundefinedもあり得るため念のため
|
||||
if (typeof token.value !== 'string') throw new Error('invalid token');
|
||||
}
|
||||
return os.api(ep.value, utils.valToJs(param), token ? token.value : (opts.token ?? null)).then(res => {
|
||||
const actualToken: string|null = token?.value ?? opts.token ?? null;
|
||||
return os.api(ep.value, utils.valToJs(param), actualToken).then(res => {
|
||||
return utils.jsToVal(res);
|
||||
}, err => {
|
||||
return values.ERROR('request_failed', utils.jsToVal(err));
|
||||
|
@@ -2595,10 +2595,16 @@ type ModerationLog = {
|
||||
} | {
|
||||
type: 'unsuspendRemoteInstance';
|
||||
info: ModerationLogPayloads['unsuspendRemoteInstance'];
|
||||
} | {
|
||||
type: 'markSensitiveDriveFile';
|
||||
info: ModerationLogPayloads['markSensitiveDriveFile'];
|
||||
} | {
|
||||
type: 'unmarkSensitiveDriveFile';
|
||||
info: ModerationLogPayloads['unmarkSensitiveDriveFile'];
|
||||
});
|
||||
|
||||
// @public (undocumented)
|
||||
export const moderationLogTypes: readonly ["updateServerSettings", "suspend", "unsuspend", "updateUserNote", "addCustomEmoji", "updateCustomEmoji", "deleteCustomEmoji", "assignRole", "unassignRole", "updateRole", "deleteRole", "clearQueue", "promoteQueue", "deleteDriveFile", "deleteNote", "createGlobalAnnouncement", "createUserAnnouncement", "updateGlobalAnnouncement", "updateUserAnnouncement", "deleteGlobalAnnouncement", "deleteUserAnnouncement", "resetPassword", "suspendRemoteInstance", "unsuspendRemoteInstance"];
|
||||
export const moderationLogTypes: readonly ["updateServerSettings", "suspend", "unsuspend", "updateUserNote", "addCustomEmoji", "updateCustomEmoji", "deleteCustomEmoji", "assignRole", "unassignRole", "updateRole", "deleteRole", "clearQueue", "promoteQueue", "deleteDriveFile", "deleteNote", "createGlobalAnnouncement", "createUserAnnouncement", "updateGlobalAnnouncement", "updateUserAnnouncement", "deleteGlobalAnnouncement", "deleteUserAnnouncement", "resetPassword", "suspendRemoteInstance", "unsuspendRemoteInstance", "markSensitiveDriveFile", "unmarkSensitiveDriveFile"];
|
||||
|
||||
// @public (undocumented)
|
||||
export const mutedNoteReasons: readonly ["word", "manual", "spam", "other"];
|
||||
|
@@ -70,6 +70,8 @@ export const moderationLogTypes = [
|
||||
'resetPassword',
|
||||
'suspendRemoteInstance',
|
||||
'unsuspendRemoteInstance',
|
||||
'markSensitiveDriveFile',
|
||||
'unmarkSensitiveDriveFile',
|
||||
] as const;
|
||||
|
||||
export type ModerationLogPayloads = {
|
||||
@@ -170,4 +172,12 @@ export type ModerationLogPayloads = {
|
||||
id: string;
|
||||
host: string;
|
||||
};
|
||||
markSensitiveDriveFile: {
|
||||
fileId: string;
|
||||
fileUserId: string | null;
|
||||
};
|
||||
unmarkSensitiveDriveFile: {
|
||||
fileId: string;
|
||||
fileUserId: string | null;
|
||||
};
|
||||
};
|
||||
|
@@ -646,4 +646,10 @@ export type ModerationLog = {
|
||||
} | {
|
||||
type: 'unsuspendRemoteInstance';
|
||||
info: ModerationLogPayloads['unsuspendRemoteInstance'];
|
||||
} | {
|
||||
type: 'markSensitiveDriveFile';
|
||||
info: ModerationLogPayloads['markSensitiveDriveFile'];
|
||||
} | {
|
||||
type: 'unmarkSensitiveDriveFile';
|
||||
info: ModerationLogPayloads['unmarkSensitiveDriveFile'];
|
||||
});
|
||||
|
45
pnpm-lock.yaml
generated
45
pnpm-lock.yaml
generated
@@ -802,6 +802,9 @@ importers:
|
||||
uuid:
|
||||
specifier: 9.0.1
|
||||
version: 9.0.1
|
||||
v-code-diff:
|
||||
specifier: ^1.7.1
|
||||
version: 1.7.1(vue@3.3.4)
|
||||
vanilla-tilt:
|
||||
specifier: 1.8.1
|
||||
version: 1.8.1
|
||||
@@ -10523,6 +10526,10 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/diff-match-patch@1.0.5:
|
||||
resolution: {integrity: sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==}
|
||||
dev: false
|
||||
|
||||
/diff-sequences@28.1.1:
|
||||
resolution: {integrity: sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==}
|
||||
engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0}
|
||||
@@ -10536,7 +10543,6 @@ packages:
|
||||
/diff@5.1.0:
|
||||
resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==}
|
||||
engines: {node: '>=0.3.1'}
|
||||
dev: true
|
||||
|
||||
/dijkstrajs@1.0.2:
|
||||
resolution: {integrity: sha512-QV6PMaHTCNmKSeP6QoXhVTw9snc9VD8MulTT0Bd99Pacp4SS1cjcrYPgBPmibqKVtMJJfqC6XvOXgPMEEPH/fg==}
|
||||
@@ -12361,6 +12367,11 @@ packages:
|
||||
/highlight.js@10.7.3:
|
||||
resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==}
|
||||
|
||||
/highlight.js@11.8.0:
|
||||
resolution: {integrity: sha512-MedQhoqVdr0U6SSnWPzfiadUcDHfN/Wzq25AkXiQv9oiOO/sG0S7XkvpFIqWBl9Yq1UYyYOOVORs5UW2XlPyzg==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dev: false
|
||||
|
||||
/hosted-git-info@2.8.9:
|
||||
resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==}
|
||||
dev: true
|
||||
@@ -18891,6 +18902,23 @@ packages:
|
||||
resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==}
|
||||
hasBin: true
|
||||
|
||||
/v-code-diff@1.7.1(vue@3.3.4):
|
||||
resolution: {integrity: sha512-2O34z6DcVw3LygR9Xl07A28115nsps56dCH6zxFMLoW1jyEnWFPN7Kwh0GAYAeWzDiltbqsMWgvfqJYjBEZPgw==}
|
||||
requiresBuild: true
|
||||
peerDependencies:
|
||||
'@vue/composition-api': ^1.4.9
|
||||
vue: ^2.6.0 || >=3.0.0
|
||||
peerDependenciesMeta:
|
||||
'@vue/composition-api':
|
||||
optional: true
|
||||
dependencies:
|
||||
diff: 5.1.0
|
||||
diff-match-patch: 1.0.5
|
||||
highlight.js: 11.8.0
|
||||
vue: 3.3.4
|
||||
vue-demi: 0.13.11(vue@3.3.4)
|
||||
dev: false
|
||||
|
||||
/v8-to-istanbul@9.1.0:
|
||||
resolution: {integrity: sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==}
|
||||
engines: {node: '>=10.12.0'}
|
||||
@@ -19077,6 +19105,21 @@ packages:
|
||||
resolution: {integrity: sha512-zbCQviVRexZ7NF2kizQq5LicG5QGXPHPALKE3t59f5q2FwaG9GKtdhhIV4rw4LDUm9RkvGAP8TSXlXcBWY8rFQ==}
|
||||
dev: true
|
||||
|
||||
/vue-demi@0.13.11(vue@3.3.4):
|
||||
resolution: {integrity: sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==}
|
||||
engines: {node: '>=12'}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
peerDependencies:
|
||||
'@vue/composition-api': ^1.0.0-rc.1
|
||||
vue: ^3.0.0-0 || ^2.6.0
|
||||
peerDependenciesMeta:
|
||||
'@vue/composition-api':
|
||||
optional: true
|
||||
dependencies:
|
||||
vue: 3.3.4
|
||||
dev: false
|
||||
|
||||
/vue-docgen-api@4.64.1(vue@3.3.4):
|
||||
resolution: {integrity: sha512-jbOf7ByE3Zvtuk+429Jorl+eIeh2aB2Fx1GUo3xJd1aByJWE8KDlSEa6b11PB1ze8f0sRUBraRDinICCk0KY7g==}
|
||||
dependencies:
|
||||
|
Reference in New Issue
Block a user