Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 141964e57c | |||
| 41592eafb3 | |||
| 2a14025c29 | |||
| 75b5dc1cd8 | |||
| ee0eeb052f | |||
| ece4efcefe | |||
| cd973b252a | |||
| 666f78e676 | |||
| cf89c4e363 | |||
| bf41e9edd1 | |||
| f92c187e2b | |||
| 8c5572dd3b | |||
| e18b92823f | |||
| 2d709ceeb4 | |||
| 38b3eecc8c | |||
| f6fc78f578 |
@@ -13,11 +13,14 @@
|
||||
- Enhance: ドライブのファイル一覧で自動でもっと見るを利用可能に
|
||||
- Enhance: ウィジェットの表示設定をプレビューを見ながら行えるように
|
||||
- Enhance: ウィジェットの設定項目のラベルの多言語対応
|
||||
- Enhance: パフォーマンスの向上
|
||||
- Fix: ドライブクリーナーでファイルを削除しても画面に反映されない問題を修正 #16061
|
||||
- Fix: 非ログイン時にログインを求めるダイアログが表示された後にダイアログのぼかしが解除されず操作不能になることがある問題を修正
|
||||
- Fix: ドライブのソートが「登録日(昇順)」の場合に正しく動作しない問題を修正
|
||||
- Fix: 高度なMFMのピッカーを使用する際の挙動を改善
|
||||
- Fix: 管理画面でアーカイブ済のお知らせを表示した際にアクティブなお知らせが多い旨の警告が出る問題を修正
|
||||
- Fix: ファイルタブのセンシティブメディアを開く際に確認ダイアログを出す設定が適用されない問題を修正
|
||||
- Fix: 2月29日を誕生日に設定している場合、閏年以外は3月1日を誕生日として扱うように修正
|
||||
|
||||
### Server
|
||||
- Enhance: OAuthのクライアント情報取得(Client Information Discovery)において、IndieWeb Living Standard 11 July 2024で定義されているJSONドキュメント形式に対応しました
|
||||
|
||||
@@ -51,3 +51,13 @@ Thanks to [Crowdin](https://crowdin.com/) for providing the localization platfor
|
||||
<a href="https://hub.docker.com/"><img src="https://user-images.githubusercontent.com/20679825/230148221-f8e73a32-a49b-47c3-9029-9a15c3824f92.png" height="30" alt="Docker" /></a>
|
||||
|
||||
Thanks to [Docker](https://hub.docker.com/) for providing the container platform that helps us run Misskey in production.
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
|
||||
Support us with a ⭐ !
|
||||
|
||||
[](https://star-history.com/#misskey-dev/misskey&Date)
|
||||
|
||||
</div>
|
||||
|
||||
+7
-7
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "misskey",
|
||||
"version": "2026.1.0-alpha.1",
|
||||
"version": "2026.1.0-alpha.4",
|
||||
"codename": "nasubi",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/misskey-dev/misskey.git"
|
||||
},
|
||||
"packageManager": "pnpm@10.26.2",
|
||||
"packageManager": "pnpm@10.27.0",
|
||||
"workspaces": [
|
||||
"packages/misskey-js",
|
||||
"packages/i18n",
|
||||
@@ -23,7 +23,7 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"compile-config": "cd packages/backend && pnpm compile-config",
|
||||
"build-pre": "node ./scripts/build-pre.js",
|
||||
"build-pre": "node scripts/build-pre.mjs",
|
||||
"build-assets": "node ./scripts/build-assets.mjs",
|
||||
"build": "pnpm build-pre && pnpm -r build && pnpm build-assets",
|
||||
"build-storybook": "pnpm --filter frontend build-storybook",
|
||||
@@ -39,7 +39,7 @@
|
||||
"migrateandstart": "pnpm migrate && pnpm start",
|
||||
"watch": "pnpm dev",
|
||||
"dev": "node scripts/dev.mjs",
|
||||
"lint": "pnpm -r lint",
|
||||
"lint": "pnpm --no-bail -r lint",
|
||||
"cy:open": "pnpm cypress open --config-file=cypress.config.ts",
|
||||
"cy:run": "pnpm cypress run",
|
||||
"e2e": "pnpm start-server-and-test start:test http://localhost:61812 cy:run",
|
||||
@@ -48,8 +48,8 @@
|
||||
"jest-and-coverage": "cd packages/backend && pnpm jest-and-coverage",
|
||||
"test": "pnpm -r test",
|
||||
"test-and-coverage": "pnpm -r test-and-coverage",
|
||||
"clean": "node ./scripts/clean.js",
|
||||
"clean-all": "node ./scripts/clean-all.js",
|
||||
"clean": "node scripts/clean.mjs",
|
||||
"clean-all": "node scripts/clean-all.mjs",
|
||||
"cleanall": "pnpm clean-all"
|
||||
},
|
||||
"resolutions": {
|
||||
@@ -79,7 +79,7 @@
|
||||
"eslint": "9.39.2",
|
||||
"globals": "16.5.0",
|
||||
"ncp": "2.0.0",
|
||||
"pnpm": "10.26.2",
|
||||
"pnpm": "10.27.0",
|
||||
"typescript": "5.9.3",
|
||||
"start-server-and-test": "2.1.3"
|
||||
},
|
||||
|
||||
@@ -9,7 +9,7 @@ window.onload = async () => {
|
||||
const account = JSON.parse(localStorage.getItem('account'));
|
||||
const i = account.token;
|
||||
|
||||
const api = (endpoint, data = {}) => {
|
||||
const _api = (endpoint, data = {}) => {
|
||||
const promise = new Promise((resolve, reject) => {
|
||||
// Append a credential
|
||||
if (i) data.i = i;
|
||||
|
||||
@@ -25,7 +25,6 @@ export default [
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
'import/order': ['warn', {
|
||||
groups: [
|
||||
'builtin',
|
||||
|
||||
@@ -16,24 +16,22 @@ async function connectToPostgres() {
|
||||
}
|
||||
|
||||
async function connectToRedis(redisOptions) {
|
||||
return await new Promise(async (resolve, reject) => {
|
||||
const redis = new Redis({
|
||||
let redis;
|
||||
try {
|
||||
redis = new Redis({
|
||||
...redisOptions,
|
||||
lazyConnect: true,
|
||||
reconnectOnError: false,
|
||||
showFriendlyErrorStack: true,
|
||||
});
|
||||
redis.on('error', e => reject(e));
|
||||
|
||||
try {
|
||||
await redis.connect();
|
||||
resolve();
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
} finally {
|
||||
redis.disconnect(false);
|
||||
}
|
||||
});
|
||||
await Promise.race([
|
||||
new Promise((_, reject) => redis.on('error', e => reject(e))),
|
||||
redis.connect(),
|
||||
]);
|
||||
} finally {
|
||||
redis.disconnect(false);
|
||||
}
|
||||
}
|
||||
|
||||
// If not all of these are defined, the default one gets reused.
|
||||
|
||||
@@ -58,7 +58,7 @@ export async function masterMain() {
|
||||
//await connectDb();
|
||||
if (config.pidFile) fs.writeFileSync(config.pidFile, process.pid.toString());
|
||||
} catch (e) {
|
||||
bootLogger.error('Fatal error occurred during initialization', null, true);
|
||||
bootLogger.error('Fatal error occurred during initialization: ' + e, null, true);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -352,7 +352,7 @@ export function loadConfig(): Config {
|
||||
function tryCreateUrl(url: string) {
|
||||
try {
|
||||
return new URL(url);
|
||||
} catch (e) {
|
||||
} catch (_) {
|
||||
throw new Error(`url="${url}" is not a valid URL.`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class AccountMoveService {
|
||||
*/
|
||||
@bindThis
|
||||
public async moveFromLocal(src: MiLocalUser, dst: MiLocalUser | MiRemoteUser): Promise<unknown> {
|
||||
const srcUri = this.userEntityService.getUserUri(src);
|
||||
const _srcUri = this.userEntityService.getUserUri(src);
|
||||
const dstUri = this.userEntityService.getUserUri(dst);
|
||||
|
||||
// add movedToUri to indicate that the user has moved
|
||||
|
||||
@@ -205,7 +205,7 @@ export class AnnouncementService {
|
||||
announcementId: announcementId,
|
||||
userId: user.id,
|
||||
});
|
||||
} catch (e) {
|
||||
} catch (_) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ export class AvatarDecorationService implements OnApplicationShutdown {
|
||||
const obj = JSON.parse(data);
|
||||
|
||||
if (obj.channel === 'internal') {
|
||||
const { type, body } = obj.message as GlobalEvents['internal']['payload'];
|
||||
const { type, body: _ } = obj.message as GlobalEvents['internal']['payload'];
|
||||
switch (type) {
|
||||
case 'avatarDecorationCreated':
|
||||
case 'avatarDecorationUpdated':
|
||||
|
||||
@@ -366,7 +366,7 @@ export class EmailService {
|
||||
valid: true,
|
||||
reason: null,
|
||||
};
|
||||
} catch (error) {
|
||||
} catch (_) {
|
||||
return {
|
||||
valid: false,
|
||||
reason: 'network',
|
||||
|
||||
@@ -484,25 +484,13 @@ export class FileInfoService {
|
||||
* Calculate blurhash string of image
|
||||
*/
|
||||
@bindThis
|
||||
private getBlurhash(path: string, type: string): Promise<string> {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
(await sharpBmp(path, type))
|
||||
.raw()
|
||||
.ensureAlpha()
|
||||
.resize(64, 64, { fit: 'inside' })
|
||||
.toBuffer((err, buffer, info) => {
|
||||
if (err) return reject(err);
|
||||
|
||||
let hash;
|
||||
|
||||
try {
|
||||
hash = blurhash.encode(new Uint8ClampedArray(buffer), info.width, info.height, 5, 5);
|
||||
} catch (e) {
|
||||
return reject(e);
|
||||
}
|
||||
|
||||
resolve(hash);
|
||||
});
|
||||
});
|
||||
private async getBlurhash(path: string, type: string): Promise<string> {
|
||||
const sharp = await sharpBmp(path, type);
|
||||
const { data: buffer, info } = await sharp
|
||||
.raw()
|
||||
.ensureAlpha()
|
||||
.resize(64, 64, { fit: 'inside' })
|
||||
.toBuffer({ resolveWithObject: true });
|
||||
return blurhash.encode(new Uint8ClampedArray(buffer), info.width, info.height, 5, 5);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,11 +38,7 @@ export interface BroadcastTypes {
|
||||
emojis: Packed<'EmojiDetailed'>[];
|
||||
};
|
||||
emojiDeleted: {
|
||||
emojis: {
|
||||
id?: string;
|
||||
name: string;
|
||||
[other: string]: any;
|
||||
}[];
|
||||
emojis: Packed<'EmojiDetailed'>[];
|
||||
};
|
||||
announcementCreated: {
|
||||
announcement: Packed<'Announcement'>;
|
||||
|
||||
@@ -308,7 +308,7 @@ export class MfmService {
|
||||
try {
|
||||
const date = new Date(parseInt(text, 10) * 1000);
|
||||
return `<time datetime="${escapeHtml(date.toISOString())}">${escapeHtml(date.toISOString())}</time>`;
|
||||
} catch (err) {
|
||||
} catch (_) {
|
||||
return fnDefault(node);
|
||||
}
|
||||
}
|
||||
@@ -376,7 +376,7 @@ export class MfmService {
|
||||
try {
|
||||
const url = new URL(node.props.url);
|
||||
return `<a href="${escapeHtml(url.href)}">${toHtml(node.children)}</a>`;
|
||||
} catch (err) {
|
||||
} catch (_) {
|
||||
return `[${toHtml(node.children)}](${escapeHtml(node.props.url)})`;
|
||||
}
|
||||
},
|
||||
@@ -390,7 +390,7 @@ export class MfmService {
|
||||
try {
|
||||
const url = new URL(href);
|
||||
return `<a href="${escapeHtml(url.href)}" class="u-url mention">${escapeHtml(acct)}</a>`;
|
||||
} catch (err) {
|
||||
} catch (_) {
|
||||
return escapeHtml(acct);
|
||||
}
|
||||
},
|
||||
@@ -419,7 +419,7 @@ export class MfmService {
|
||||
try {
|
||||
const url = new URL(node.props.url);
|
||||
return `<a href="${escapeHtml(url.href)}">${escapeHtml(node.props.url)}</a>`;
|
||||
} catch (err) {
|
||||
} catch (_) {
|
||||
return escapeHtml(node.props.url);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -187,9 +187,9 @@ export class NoteDraftService {
|
||||
}
|
||||
|
||||
//#region visibleUsers
|
||||
let visibleUsers: MiUser[] = [];
|
||||
let _visibleUsers: MiUser[] = [];
|
||||
if (data.visibleUserIds != null && data.visibleUserIds.length > 0) {
|
||||
visibleUsers = await this.usersRepository.findBy({
|
||||
_visibleUsers = await this.usersRepository.findBy({
|
||||
id: In(data.visibleUserIds),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -314,7 +314,7 @@ export class RoleService implements OnApplicationShutdown, OnModuleInit {
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
} catch (err) {
|
||||
} catch (_) {
|
||||
// TODO: log error
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -190,8 +190,7 @@ export class SearchService {
|
||||
return this.searchNoteByMeiliSearch(q, me, opts, pagination);
|
||||
}
|
||||
default: {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const typeCheck: never = this.provider;
|
||||
const _: never = this.provider;
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,8 +49,8 @@ export class UserSuspendService {
|
||||
});
|
||||
|
||||
(async () => {
|
||||
await this.postSuspend(user).catch(e => {});
|
||||
await this.unFollowAll(user).catch(e => {});
|
||||
await this.postSuspend(user).catch(_ => {});
|
||||
await this.unFollowAll(user).catch(_ => {});
|
||||
})();
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ export class UserSuspendService {
|
||||
});
|
||||
|
||||
(async () => {
|
||||
await this.postUnsuspend(user).catch(e => {});
|
||||
await this.postUnsuspend(user).catch(_ => {});
|
||||
})();
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ export class UtilityService {
|
||||
try {
|
||||
// TODO: RE2インスタンスをキャッシュ
|
||||
return new RE2(regexp[1], regexp[2]).test(text);
|
||||
} catch (err) {
|
||||
} catch (_) {
|
||||
// This should never happen due to input sanitisation.
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -515,7 +515,7 @@ export class ApRendererService {
|
||||
const restPart = maybeUrl.slice(match[0].length);
|
||||
|
||||
return `<a href="${urlPartParsed.href}" rel="me nofollow noopener" target="_blank">${urlPart}</a>${restPart}`;
|
||||
} catch (e) {
|
||||
} catch (_) {
|
||||
return maybeUrl;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -226,7 +226,7 @@ export class ApRequestService {
|
||||
return await this.signedGet(href, user, allowSoftfail, false);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
} catch (_) {
|
||||
// something went wrong parsing the HTML, ignore the whole thing
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ export class ChatEntityService {
|
||||
const reactions: { reaction: string; }[] = [];
|
||||
|
||||
for (const record of message.reactions) {
|
||||
const [userId, reaction] = record.split('/');
|
||||
const [, reaction] = record.split('/');
|
||||
reactions.push({
|
||||
reaction,
|
||||
});
|
||||
|
||||
@@ -17,6 +17,7 @@ import { deepClone } from '@/misc/clone.js';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
import { isMimeImage } from '@/misc/is-mime-image.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import { uniqueByKey } from '@/misc/unique-by-key.js';
|
||||
import { UtilityService } from '../UtilityService.js';
|
||||
import { VideoProcessingService } from '../VideoProcessingService.js';
|
||||
import { UserEntityService } from './UserEntityService.js';
|
||||
@@ -226,6 +227,7 @@ export class DriveFileEntityService {
|
||||
options?: PackOptions,
|
||||
hint?: {
|
||||
packedUser?: Packed<'UserLite'>
|
||||
packedFolder?: Packed<'DriveFolder'>
|
||||
},
|
||||
): Promise<Packed<'DriveFile'> | null> {
|
||||
const opts = Object.assign({
|
||||
@@ -250,9 +252,9 @@ export class DriveFileEntityService {
|
||||
thumbnailUrl: this.getThumbnailUrl(file),
|
||||
comment: file.comment,
|
||||
folderId: file.folderId,
|
||||
folder: opts.detail && file.folderId ? this.driveFolderEntityService.pack(file.folderId, {
|
||||
folder: opts.detail && file.folderId ? (hint?.packedFolder ?? this.driveFolderEntityService.pack(file.folderId, {
|
||||
detail: true,
|
||||
}) : null,
|
||||
})) : null,
|
||||
userId: file.userId,
|
||||
user: (opts.withUser && file.userId) ? hint?.packedUser ?? this.userEntityService.pack(file.userId) : null,
|
||||
});
|
||||
@@ -263,10 +265,41 @@ export class DriveFileEntityService {
|
||||
files: MiDriveFile[],
|
||||
options?: PackOptions,
|
||||
): Promise<Packed<'DriveFile'>[]> {
|
||||
const _user = files.map(({ user, userId }) => user ?? userId).filter(x => x != null);
|
||||
const _userMap = await this.userEntityService.packMany(_user)
|
||||
.then(users => new Map(users.map(user => [user.id, user])));
|
||||
const items = await Promise.all(files.map(f => this.packNullable(f, options, f.userId ? { packedUser: _userMap.get(f.userId) } : {})));
|
||||
// -- ユーザ情報の事前取得 --
|
||||
|
||||
let userMap: Map<string, Packed<'UserLite'>> | null = null;
|
||||
if (options?.withUser) {
|
||||
const users = files
|
||||
.map(({ user, userId }) => user ?? userId)
|
||||
.filter(x => x != null);
|
||||
|
||||
const uniqueUsers = uniqueByKey(users, (user) => typeof user === 'string' ? user : user.id);
|
||||
const packedUsers = await this.userEntityService.packMany(uniqueUsers);
|
||||
userMap = new Map(packedUsers.map(user => [user.id, user]));
|
||||
}
|
||||
|
||||
// -- フォルダ情報の事前取得 --
|
||||
|
||||
let folderMap: Map<string, Packed<'DriveFolder'>> | null = null;
|
||||
if (options?.detail) {
|
||||
const folders = files
|
||||
.map(({ folder, folderId }) => folder ?? folderId)
|
||||
.filter(x => x != null);
|
||||
|
||||
const uniqueFolders = uniqueByKey(folders, (folder) => typeof folder === 'string' ? folder : folder.id);
|
||||
const packedFolders = await this.driveFolderEntityService.packMany(uniqueFolders, { detail: true });
|
||||
folderMap = new Map(packedFolders.map(folder => [folder.id, folder]));
|
||||
}
|
||||
|
||||
const items = await Promise.all(files.map(f => this.packNullable(
|
||||
f,
|
||||
options,
|
||||
{
|
||||
packedUser: f.userId ? userMap?.get(f.userId) : undefined,
|
||||
packedFolder: f.folderId ? folderMap?.get(f.folderId) : undefined,
|
||||
},
|
||||
)));
|
||||
|
||||
return items.filter(x => x != null);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,9 @@ import type { } from '@/models/Blocking.js';
|
||||
import type { MiDriveFolder } from '@/models/DriveFolder.js';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import { In } from 'typeorm';
|
||||
import { uniqueByKey } from '@/misc/unique-by-key.js';
|
||||
import { splitIdAndObjects } from '@/misc/split-id-and-objects.js';
|
||||
|
||||
@Injectable()
|
||||
export class DriveFolderEntityService {
|
||||
@@ -32,12 +35,20 @@ export class DriveFolderEntityService {
|
||||
options?: {
|
||||
detail: boolean
|
||||
},
|
||||
hint?: {
|
||||
folderMap?: Map<string, MiDriveFolder>;
|
||||
foldersCountMap?: Map<string, number> | null;
|
||||
filesCountMap?: Map<string, number> | null;
|
||||
parentPacker?: (id: string) => Promise<Packed<'DriveFolder'>>;
|
||||
},
|
||||
): Promise<Packed<'DriveFolder'>> {
|
||||
const opts = Object.assign({
|
||||
detail: false,
|
||||
}, options);
|
||||
|
||||
const folder = typeof src === 'object' ? src : await this.driveFoldersRepository.findOneByOrFail({ id: src });
|
||||
const folder = typeof src === 'object'
|
||||
? src
|
||||
: hint?.folderMap?.get(src) ?? await this.driveFoldersRepository.findOneByOrFail({ id: src });
|
||||
|
||||
return await awaitAll({
|
||||
id: folder.id,
|
||||
@@ -46,20 +57,141 @@ export class DriveFolderEntityService {
|
||||
parentId: folder.parentId,
|
||||
|
||||
...(opts.detail ? {
|
||||
foldersCount: this.driveFoldersRepository.countBy({
|
||||
parentId: folder.id,
|
||||
}),
|
||||
filesCount: this.driveFilesRepository.countBy({
|
||||
folderId: folder.id,
|
||||
}),
|
||||
foldersCount: hint?.foldersCountMap?.get(folder.id)
|
||||
?? this.driveFoldersRepository.countBy({
|
||||
parentId: folder.id,
|
||||
}),
|
||||
filesCount: hint?.filesCountMap?.get(folder.id)
|
||||
?? this.driveFilesRepository.countBy({
|
||||
folderId: folder.id,
|
||||
}),
|
||||
|
||||
...(folder.parentId ? {
|
||||
parent: this.pack(folder.parentId, {
|
||||
detail: true,
|
||||
}),
|
||||
parent: hint?.parentPacker
|
||||
? hint.parentPacker(folder.parentId)
|
||||
: this.pack(folder.parentId, { detail: true }, hint),
|
||||
} : {}),
|
||||
} : {}),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public async packMany(
|
||||
src: Array<MiDriveFolder['id'] | MiDriveFolder>,
|
||||
options?: {
|
||||
detail: boolean
|
||||
},
|
||||
): Promise<Array<Packed<'DriveFolder'>>> {
|
||||
/**
|
||||
* 重複を除去しつつ、必要なDriveFolderオブジェクトをすべて取得する
|
||||
*/
|
||||
const collectUniqueObjects = async (src: Array<MiDriveFolder['id'] | MiDriveFolder>) => {
|
||||
const uniqueSrc = uniqueByKey(
|
||||
src,
|
||||
(s) => typeof s === 'string' ? s : s.id,
|
||||
);
|
||||
const { ids, objects } = splitIdAndObjects(uniqueSrc);
|
||||
|
||||
const uniqueObjects = new Map<string, MiDriveFolder>(objects.map(s => [s.id, s]));
|
||||
const needsFetchIds = ids.filter(id => !uniqueObjects.has(id));
|
||||
|
||||
if (needsFetchIds.length > 0) {
|
||||
const fetchedObjects = await this.driveFoldersRepository.find({
|
||||
where: {
|
||||
id: In(needsFetchIds),
|
||||
},
|
||||
});
|
||||
for (const obj of fetchedObjects) {
|
||||
uniqueObjects.set(obj.id, obj);
|
||||
}
|
||||
}
|
||||
|
||||
return uniqueObjects;
|
||||
};
|
||||
|
||||
/**
|
||||
* 親フォルダーを再帰的に収集する
|
||||
*/
|
||||
const collectAncestors = async (folderMap: Map<string, MiDriveFolder>) => {
|
||||
for (;;) {
|
||||
const parentIds = new Set<string>();
|
||||
for (const folder of folderMap.values()) {
|
||||
if (folder.parentId != null && !folderMap.has(folder.parentId)) {
|
||||
parentIds.add(folder.parentId);
|
||||
}
|
||||
}
|
||||
|
||||
if (parentIds.size === 0) break;
|
||||
|
||||
const fetchedParents = await this.driveFoldersRepository.find({
|
||||
where: {
|
||||
id: In([...parentIds]),
|
||||
},
|
||||
});
|
||||
|
||||
if (fetchedParents.length === 0) break;
|
||||
|
||||
for (const parent of fetchedParents) {
|
||||
folderMap.set(parent.id, parent);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const opts = Object.assign({
|
||||
detail: false,
|
||||
}, options);
|
||||
|
||||
const folderMap = await collectUniqueObjects(src);
|
||||
|
||||
let foldersCountMap: Map<string, number> | null = null;
|
||||
let filesCountMap: Map<string, number> | null = null;
|
||||
if (opts.detail) {
|
||||
await collectAncestors(folderMap);
|
||||
|
||||
const ids = [...folderMap.keys()];
|
||||
if (ids.length > 0) {
|
||||
const folderCounts = await this.driveFoldersRepository.createQueryBuilder('folder')
|
||||
.select('folder.parentId', 'parentId')
|
||||
.addSelect('COUNT(*)', 'count')
|
||||
.where('folder.parentId IN (:...ids)', { ids })
|
||||
.groupBy('folder.parentId')
|
||||
.getRawMany<{ parentId: string; count: string }>();
|
||||
|
||||
const fileCounts = await this.driveFilesRepository.createQueryBuilder('file')
|
||||
.select('file.folderId', 'folderId')
|
||||
.addSelect('COUNT(*)', 'count')
|
||||
.where('file.folderId IN (:...ids)', { ids })
|
||||
.groupBy('file.folderId')
|
||||
.getRawMany<{ folderId: string; count: string }>();
|
||||
|
||||
foldersCountMap = new Map(folderCounts.map(row => [row.parentId, Number(row.count)]));
|
||||
filesCountMap = new Map(fileCounts.map(row => [row.folderId, Number(row.count)]));
|
||||
} else {
|
||||
foldersCountMap = new Map();
|
||||
filesCountMap = new Map();
|
||||
}
|
||||
}
|
||||
|
||||
const packedMap = new Map<string, Promise<Packed<'DriveFolder'>>>();
|
||||
const packFromId = (id: string): Promise<Packed<'DriveFolder'>> => {
|
||||
const cached = packedMap.get(id);
|
||||
if (cached) return cached;
|
||||
|
||||
const folder = folderMap.get(id);
|
||||
if (!folder) {
|
||||
throw new Error(`DriveFolder not found: ${id}`);
|
||||
}
|
||||
|
||||
const packedPromise = this.pack(folder, options, {
|
||||
folderMap,
|
||||
foldersCountMap,
|
||||
filesCountMap,
|
||||
parentPacker: packFromId,
|
||||
});
|
||||
packedMap.set(id, packedPromise);
|
||||
|
||||
return packedPromise;
|
||||
};
|
||||
|
||||
return Promise.all(src.map(s => packFromId(typeof s === 'string' ? s : s.id)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ export class EmojiEntityService {
|
||||
|
||||
@bindThis
|
||||
public packSimpleMany(
|
||||
emojis: any[],
|
||||
emojis: (MiEmoji['id'] | MiEmoji)[],
|
||||
) {
|
||||
return Promise.all(emojis.map(x => this.packSimple(x)));
|
||||
}
|
||||
@@ -69,7 +69,7 @@ export class EmojiEntityService {
|
||||
|
||||
@bindThis
|
||||
public packDetailedMany(
|
||||
emojis: any[],
|
||||
emojis: (MiEmoji['id'] | MiEmoji)[],
|
||||
): Promise<Packed<'EmojiDetailed'>[]> {
|
||||
return Promise.all(emojis.map(x => this.packDetailed(x)));
|
||||
}
|
||||
|
||||
@@ -55,13 +55,13 @@ export class MetaEntityService {
|
||||
if (instance.defaultLightTheme) {
|
||||
try {
|
||||
defaultLightTheme = JSON.stringify(JSON5.parse(instance.defaultLightTheme));
|
||||
} catch (e) {
|
||||
} catch (_) {
|
||||
}
|
||||
}
|
||||
if (instance.defaultDarkTheme) {
|
||||
try {
|
||||
defaultDarkTheme = JSON.stringify(JSON5.parse(instance.defaultDarkTheme));
|
||||
} catch (e) {
|
||||
} catch (_) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ export class NoteReactionEntityService implements OnModuleInit {
|
||||
packedUser?: Packed<'UserLite'>
|
||||
},
|
||||
): Promise<Packed<'NoteReaction'>> {
|
||||
const opts = Object.assign({
|
||||
const _opts = Object.assign({
|
||||
}, options);
|
||||
|
||||
const reaction = typeof src === 'object' ? src : await this.noteReactionsRepository.findOneByOrFail({ id: src });
|
||||
@@ -90,7 +90,7 @@ export class NoteReactionEntityService implements OnModuleInit {
|
||||
packedUser?: Packed<'UserLite'>
|
||||
},
|
||||
): Promise<Packed<'NoteReactionWithNote'>> {
|
||||
const opts = Object.assign({
|
||||
const _opts = Object.assign({
|
||||
}, options);
|
||||
|
||||
const reaction = typeof src === 'object' ? src : await this.noteReactionsRepository.findOneByOrFail({ id: src });
|
||||
|
||||
@@ -56,7 +56,7 @@ export async function checkWordMute(note: NoteLike, me: UserLike | null | undefi
|
||||
|
||||
try {
|
||||
return new RE2(regexp[1], regexp[2]).test(text);
|
||||
} catch (err) {
|
||||
} catch (_) {
|
||||
// This should never happen due to input sanitisation.
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ export function getIpHash(ip: string): string {
|
||||
// (this means for IPv4 the entire address is used)
|
||||
const prefix = IPCIDR.createAddress(ip).mask(64);
|
||||
return 'ip-' + BigInt('0b' + prefix).toString(36);
|
||||
} catch (e) {
|
||||
} catch (_) {
|
||||
const prefix = IPCIDR.createAddress(ip.replace(/:[0-9]+$/, '')).mask(64);
|
||||
return 'ip-' + BigInt('0b' + prefix).toString(36);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ export class I18n<T extends Record<string, any>> {
|
||||
}
|
||||
}
|
||||
return str;
|
||||
} catch (e) {
|
||||
} catch (_) {
|
||||
console.warn(`missing localization '${key}'`);
|
||||
return key;
|
||||
}
|
||||
|
||||
@@ -262,8 +262,6 @@ type ObjectSchemaTypeDef<p extends Schema> =
|
||||
never :
|
||||
any;
|
||||
|
||||
type ObjectSchemaType<p extends Schema> = NullOrUndefined<p, ObjectSchemaTypeDef<p>>;
|
||||
|
||||
export type SchemaTypeDef<p extends Schema> =
|
||||
p['type'] extends 'null' ? null :
|
||||
p['type'] extends 'integer' ? number :
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
/**
|
||||
* idとオブジェクトを分離する
|
||||
* @param input idまたはオブジェクトの配列
|
||||
* @returns idの配列とオブジェクトの配列
|
||||
*/
|
||||
export function splitIdAndObjects<T extends { id: string }>(input: (T | string)[]): { ids: string[]; objects: T[] } {
|
||||
const ids: string[] = [];
|
||||
const objects : T[] = [];
|
||||
|
||||
for (const item of input) {
|
||||
if (typeof item === 'string') {
|
||||
ids.push(item);
|
||||
} else {
|
||||
objects.push(item);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
ids,
|
||||
objects,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
/**
|
||||
* itemsの中でkey関数が返す値が重複しないようにした配列を返す
|
||||
* @param items 重複を除去したい配列
|
||||
* @param key 重複判定に使うキーを返す関数
|
||||
* @returns 重複を除去した配列
|
||||
*/
|
||||
export function uniqueByKey<TItem, TKey = string>(items: Iterable<TItem>, key: (item: TItem) => TKey): TItem[] {
|
||||
const map = new Map<TKey, TItem>();
|
||||
for (const item of items) {
|
||||
const k = key(item);
|
||||
if (!map.has(k)) {
|
||||
map.set(k, item);
|
||||
}
|
||||
}
|
||||
return [...map.values()];
|
||||
}
|
||||
@@ -67,7 +67,7 @@ export class MiAbuseReportNotificationRecipient {
|
||||
/**
|
||||
* 通知先のユーザ.
|
||||
*/
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn({ name: 'userId', referencedColumnName: 'id', foreignKeyConstraintName: 'FK_abuse_report_notification_recipient_userId1' })
|
||||
@@ -76,7 +76,7 @@ export class MiAbuseReportNotificationRecipient {
|
||||
/**
|
||||
* 通知先のユーザプロフィール.
|
||||
*/
|
||||
@ManyToOne(type => MiUserProfile, {
|
||||
@ManyToOne(() => MiUserProfile, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn({ name: 'userId', referencedColumnName: 'userId', foreignKeyConstraintName: 'FK_abuse_report_notification_recipient_userId2' })
|
||||
@@ -96,7 +96,7 @@ export class MiAbuseReportNotificationRecipient {
|
||||
/**
|
||||
* 通知先のシステムWebhook.
|
||||
*/
|
||||
@ManyToOne(type => MiSystemWebhook, {
|
||||
@ManyToOne(() => MiSystemWebhook, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn({ name: 'systemWebhookId', referencedColumnName: 'id', foreignKeyConstraintName: 'FK_abuse_report_notification_recipient_systemWebhookId' })
|
||||
|
||||
@@ -18,7 +18,7 @@ export class MiAbuseUserReport {
|
||||
@Column(id())
|
||||
public targetUserId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -28,7 +28,7 @@ export class MiAbuseUserReport {
|
||||
@Column(id())
|
||||
public reporterId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -40,7 +40,7 @@ export class MiAbuseUserReport {
|
||||
})
|
||||
public assigneeId: MiUser['id'] | null;
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -41,7 +41,7 @@ export class MiAccessToken {
|
||||
@Column(id())
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -53,7 +53,7 @@ export class MiAccessToken {
|
||||
})
|
||||
public appId: MiApp['id'] | null;
|
||||
|
||||
@ManyToOne(type => MiApp, {
|
||||
@ManyToOne(() => MiApp, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -79,7 +79,7 @@ export class MiAnnouncement {
|
||||
})
|
||||
public userId: MiUser['id'] | null;
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -18,7 +18,7 @@ export class MiAnnouncementRead {
|
||||
@Column(id())
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -28,7 +28,7 @@ export class MiAnnouncementRead {
|
||||
@Column(id())
|
||||
public announcementId: MiAnnouncement['id'];
|
||||
|
||||
@ManyToOne(type => MiAnnouncement, {
|
||||
@ManyToOne(() => MiAnnouncement, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -24,7 +24,7 @@ export class MiAntenna {
|
||||
})
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -45,7 +45,7 @@ export class MiAntenna {
|
||||
})
|
||||
public userListId: MiUserList['id'] | null;
|
||||
|
||||
@ManyToOne(type => MiUserList, {
|
||||
@ManyToOne(() => MiUserList, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -20,7 +20,7 @@ export class MiApp {
|
||||
})
|
||||
public userId: MiUser['id'] | null;
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'SET NULL',
|
||||
nullable: true,
|
||||
})
|
||||
|
||||
@@ -25,7 +25,7 @@ export class MiAuthSession {
|
||||
})
|
||||
public userId: MiUser['id'] | null;
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
nullable: true,
|
||||
})
|
||||
@@ -35,7 +35,7 @@ export class MiAuthSession {
|
||||
@Column(id())
|
||||
public appId: MiApp['id'];
|
||||
|
||||
@ManyToOne(type => MiApp, {
|
||||
@ManyToOne(() => MiApp, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -20,7 +20,7 @@ export class MiBlocking {
|
||||
})
|
||||
public blockeeId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -33,7 +33,7 @@ export class MiBlocking {
|
||||
})
|
||||
public blockerId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -18,7 +18,7 @@ export class MiBubbleGameRecord {
|
||||
})
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -27,7 +27,7 @@ export class MiChannel {
|
||||
})
|
||||
public userId: MiUser['id'] | null;
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -52,7 +52,7 @@ export class MiChannel {
|
||||
})
|
||||
public bannerId: MiDriveFile['id'] | null;
|
||||
|
||||
@ManyToOne(type => MiDriveFile, {
|
||||
@ManyToOne(() => MiDriveFile, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -20,7 +20,7 @@ export class MiChannelFavorite {
|
||||
})
|
||||
public channelId: MiChannel['id'];
|
||||
|
||||
@ManyToOne(type => MiChannel, {
|
||||
@ManyToOne(() => MiChannel, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -32,7 +32,7 @@ export class MiChannelFavorite {
|
||||
})
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -21,7 +21,7 @@ export class MiChannelFollowing {
|
||||
})
|
||||
public followeeId: MiChannel['id'];
|
||||
|
||||
@ManyToOne(type => MiChannel, {
|
||||
@ManyToOne(() => MiChannel, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -34,7 +34,7 @@ export class MiChannelFollowing {
|
||||
})
|
||||
public followerId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -20,7 +20,7 @@ export class MiChannelMuting {
|
||||
})
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -32,7 +32,7 @@ export class MiChannelMuting {
|
||||
})
|
||||
public channelId: MiChannel['id'];
|
||||
|
||||
@ManyToOne(type => MiChannel, {
|
||||
@ManyToOne(() => MiChannel, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -19,7 +19,7 @@ export class MiChatApproval {
|
||||
})
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -31,7 +31,7 @@ export class MiChatApproval {
|
||||
})
|
||||
public otherId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -20,7 +20,7 @@ export class MiChatMessage {
|
||||
})
|
||||
public fromUserId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -32,7 +32,7 @@ export class MiChatMessage {
|
||||
})
|
||||
public toUserId: MiUser['id'] | null;
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -44,7 +44,7 @@ export class MiChatMessage {
|
||||
})
|
||||
public toRoomId: MiChatRoom['id'] | null;
|
||||
|
||||
@ManyToOne(type => MiChatRoom, {
|
||||
@ManyToOne(() => MiChatRoom, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -72,7 +72,7 @@ export class MiChatMessage {
|
||||
})
|
||||
public fileId: MiDriveFile['id'] | null;
|
||||
|
||||
@ManyToOne(type => MiDriveFile, {
|
||||
@ManyToOne(() => MiDriveFile, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -23,7 +23,7 @@ export class MiChatRoom {
|
||||
})
|
||||
public ownerId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -20,7 +20,7 @@ export class MiChatRoomInvitation {
|
||||
})
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -32,7 +32,7 @@ export class MiChatRoomInvitation {
|
||||
})
|
||||
public roomId: MiChatRoom['id'];
|
||||
|
||||
@ManyToOne(type => MiChatRoom, {
|
||||
@ManyToOne(() => MiChatRoom, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -20,7 +20,7 @@ export class MiChatRoomMembership {
|
||||
})
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -32,7 +32,7 @@ export class MiChatRoomMembership {
|
||||
})
|
||||
public roomId: MiChatRoom['id'];
|
||||
|
||||
@ManyToOne(type => MiChatRoom, {
|
||||
@ManyToOne(() => MiChatRoom, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -25,7 +25,7 @@ export class MiClip {
|
||||
})
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -18,7 +18,7 @@ export class MiClipFavorite {
|
||||
@Column(id())
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -27,7 +27,7 @@ export class MiClipFavorite {
|
||||
@Column(id())
|
||||
public clipId: MiClip['id'];
|
||||
|
||||
@ManyToOne(type => MiClip, {
|
||||
@ManyToOne(() => MiClip, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -21,7 +21,7 @@ export class MiClipNote {
|
||||
})
|
||||
public noteId: MiNote['id'];
|
||||
|
||||
@ManyToOne(type => MiNote, {
|
||||
@ManyToOne(() => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -34,7 +34,7 @@ export class MiClipNote {
|
||||
})
|
||||
public clipId: MiClip['id'];
|
||||
|
||||
@ManyToOne(type => MiClip, {
|
||||
@ManyToOne(() => MiClip, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -22,7 +22,7 @@ export class MiDriveFile {
|
||||
})
|
||||
public userId: MiUser['id'] | null;
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -142,7 +142,7 @@ export class MiDriveFile {
|
||||
})
|
||||
public folderId: MiDriveFolder['id'] | null;
|
||||
|
||||
@ManyToOne(type => MiDriveFolder, {
|
||||
@ManyToOne(() => MiDriveFolder, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -26,7 +26,7 @@ export class MiDriveFolder {
|
||||
})
|
||||
public userId: MiUser['id'] | null;
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -40,7 +40,7 @@ export class MiDriveFolder {
|
||||
})
|
||||
public parentId: MiDriveFolder['id'] | null;
|
||||
|
||||
@ManyToOne(type => MiDriveFolder, {
|
||||
@ManyToOne(() => MiDriveFolder, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -38,7 +38,7 @@ export class MiFlash {
|
||||
})
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -18,7 +18,7 @@ export class MiFlashLike {
|
||||
@Column(id())
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -27,7 +27,7 @@ export class MiFlashLike {
|
||||
@Column(id())
|
||||
public flashId: MiFlash['id'];
|
||||
|
||||
@ManyToOne(type => MiFlash, {
|
||||
@ManyToOne(() => MiFlash, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -20,7 +20,7 @@ export class MiFollowRequest {
|
||||
})
|
||||
public followeeId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -33,7 +33,7 @@ export class MiFollowRequest {
|
||||
})
|
||||
public followerId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -21,7 +21,7 @@ export class MiFollowing {
|
||||
})
|
||||
public followeeId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -34,7 +34,7 @@ export class MiFollowing {
|
||||
})
|
||||
public followerId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -18,7 +18,7 @@ export class MiGalleryLike {
|
||||
@Column(id())
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -27,7 +27,7 @@ export class MiGalleryLike {
|
||||
@Column(id())
|
||||
public postId: MiGalleryPost['id'];
|
||||
|
||||
@ManyToOne(type => MiGalleryPost, {
|
||||
@ManyToOne(() => MiGalleryPost, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -36,7 +36,7 @@ export class MiGalleryPost {
|
||||
})
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -21,7 +21,7 @@ export class MiMeta {
|
||||
})
|
||||
public rootUserId: MiUser['id'] | null;
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'SET NULL',
|
||||
nullable: true,
|
||||
})
|
||||
|
||||
@@ -16,7 +16,7 @@ export class MiModerationLog {
|
||||
@Column(id())
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -26,7 +26,7 @@ export class MiMuting {
|
||||
})
|
||||
public muteeId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -39,7 +39,7 @@ export class MiMuting {
|
||||
})
|
||||
public muterId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -35,7 +35,7 @@ export class MiNote {
|
||||
})
|
||||
public replyId: MiNote['id'] | null;
|
||||
|
||||
@ManyToOne(type => MiNote, {
|
||||
@ManyToOne(() => MiNote, {
|
||||
createForeignKeyConstraints: false,
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -49,7 +49,7 @@ export class MiNote {
|
||||
})
|
||||
public renoteId: MiNote['id'] | null;
|
||||
|
||||
@ManyToOne(type => MiNote, {
|
||||
@ManyToOne(() => MiNote, {
|
||||
createForeignKeyConstraints: false,
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -83,7 +83,7 @@ export class MiNote {
|
||||
})
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -208,7 +208,7 @@ export class MiNote {
|
||||
})
|
||||
public channelId: MiChannel['id'] | null;
|
||||
|
||||
@ManyToOne(type => MiChannel, {
|
||||
@ManyToOne(() => MiChannel, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -27,7 +27,7 @@ export class MiNoteDraft {
|
||||
public replyId: MiNote['id'] | null;
|
||||
|
||||
// There is a possibility that replyId is not null but reply is null when the reply note is deleted.
|
||||
@ManyToOne(type => MiNote, {
|
||||
@ManyToOne(() => MiNote, {
|
||||
createForeignKeyConstraints: false,
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -42,7 +42,7 @@ export class MiNoteDraft {
|
||||
public renoteId: MiNote['id'] | null;
|
||||
|
||||
// There is a possibility that renoteId is not null but renote is null when the renote note is deleted.
|
||||
@ManyToOne(type => MiNote, {
|
||||
@ManyToOne(() => MiNote, {
|
||||
createForeignKeyConstraints: false,
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -66,7 +66,7 @@ export class MiNoteDraft {
|
||||
})
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -120,7 +120,7 @@ export class MiNoteDraft {
|
||||
|
||||
// There is a possibility that channelId is not null but channel is null when the channel is deleted.
|
||||
// (deleting channel is not implemented so it's not happening now but may happen in the future)
|
||||
@ManyToOne(type => MiChannel, {
|
||||
@ManyToOne(() => MiChannel, {
|
||||
createForeignKeyConstraints: false,
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -18,7 +18,7 @@ export class MiNoteFavorite {
|
||||
@Column(id())
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -27,7 +27,7 @@ export class MiNoteFavorite {
|
||||
@Column(id())
|
||||
public noteId: MiNote['id'];
|
||||
|
||||
@ManyToOne(type => MiNote, {
|
||||
@ManyToOne(() => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -18,7 +18,7 @@ export class MiNoteReaction {
|
||||
@Column(id())
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -28,7 +28,7 @@ export class MiNoteReaction {
|
||||
@Column(id())
|
||||
public noteId: MiNote['id'];
|
||||
|
||||
@ManyToOne(type => MiNote, {
|
||||
@ManyToOne(() => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -19,7 +19,7 @@ export class MiNoteThreadMuting {
|
||||
})
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -56,7 +56,7 @@ export class MiPage {
|
||||
})
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -68,7 +68,7 @@ export class MiPage {
|
||||
})
|
||||
public eyeCatchingImageId: MiDriveFile['id'] | null;
|
||||
|
||||
@ManyToOne(type => MiDriveFile, {
|
||||
@ManyToOne(() => MiDriveFile, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -18,7 +18,7 @@ export class MiPageLike {
|
||||
@Column(id())
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -27,7 +27,7 @@ export class MiPageLike {
|
||||
@Column(id())
|
||||
public pageId: MiPage['id'];
|
||||
|
||||
@ManyToOne(type => MiPage, {
|
||||
@ManyToOne(() => MiPage, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -24,7 +24,7 @@ export class MiPasswordResetRequest {
|
||||
})
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -15,7 +15,7 @@ export class MiPoll {
|
||||
@PrimaryColumn(id())
|
||||
public noteId: MiNote['id'];
|
||||
|
||||
@OneToOne(type => MiNote, {
|
||||
@OneToOne(() => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -18,7 +18,7 @@ export class MiPollVote {
|
||||
@Column(id())
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -28,7 +28,7 @@ export class MiPollVote {
|
||||
@Column(id())
|
||||
public noteId: MiNote['id'];
|
||||
|
||||
@ManyToOne(type => MiNote, {
|
||||
@ManyToOne(() => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -13,7 +13,7 @@ export class MiPromoNote {
|
||||
@PrimaryColumn(id())
|
||||
public noteId: MiNote['id'];
|
||||
|
||||
@OneToOne(type => MiNote, {
|
||||
@OneToOne(() => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -18,7 +18,7 @@ export class MiPromoRead {
|
||||
@Column(id())
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -27,7 +27,7 @@ export class MiPromoRead {
|
||||
@Column(id())
|
||||
public noteId: MiNote['id'];
|
||||
|
||||
@ManyToOne(type => MiNote, {
|
||||
@ManyToOne(() => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -23,7 +23,7 @@ export class MiRegistrationTicket {
|
||||
})
|
||||
public expiresAt: Date | null;
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -36,7 +36,7 @@ export class MiRegistrationTicket {
|
||||
})
|
||||
public createdById: MiUser['id'] | null;
|
||||
|
||||
@OneToOne(type => MiUser, {
|
||||
@OneToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -25,7 +25,7 @@ export class MiRegistryItem {
|
||||
})
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -20,7 +20,7 @@ export class MiRenoteMuting {
|
||||
})
|
||||
public muteeId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -33,7 +33,7 @@ export class MiRenoteMuting {
|
||||
})
|
||||
public muterId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -27,7 +27,7 @@ export class MiReversiGame {
|
||||
@Column(id())
|
||||
public user1Id: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -36,7 +36,7 @@ export class MiReversiGame {
|
||||
@Column(id())
|
||||
public user2Id: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -21,7 +21,7 @@ export class MiRoleAssignment {
|
||||
})
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -34,7 +34,7 @@ export class MiRoleAssignment {
|
||||
})
|
||||
public roleId: MiRole['id'];
|
||||
|
||||
@ManyToOne(type => MiRole, {
|
||||
@ManyToOne(() => MiRole, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -16,7 +16,7 @@ export class MiSignin {
|
||||
@Column(id())
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -16,7 +16,7 @@ export class MiSwSubscription {
|
||||
@Column(id())
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -18,7 +18,7 @@ export class MiSystemAccount {
|
||||
@Column(id())
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -99,7 +99,7 @@ export class MiUser {
|
||||
})
|
||||
public avatarId: MiDriveFile['id'] | null;
|
||||
|
||||
@OneToOne(type => MiDriveFile, {
|
||||
@OneToOne(() => MiDriveFile, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -112,7 +112,7 @@ export class MiUser {
|
||||
})
|
||||
public bannerId: MiDriveFile['id'] | null;
|
||||
|
||||
@OneToOne(type => MiDriveFile, {
|
||||
@OneToOne(() => MiDriveFile, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -12,7 +12,7 @@ export class MiUserKeypair {
|
||||
@PrimaryColumn(id())
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@OneToOne(type => MiUser, {
|
||||
@OneToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -25,7 +25,7 @@ export class MiUserList {
|
||||
})
|
||||
public isPublic: boolean;
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -18,7 +18,7 @@ export class MiUserListFavorite {
|
||||
@Column(id())
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -27,7 +27,7 @@ export class MiUserListFavorite {
|
||||
@Column(id())
|
||||
public userListId: MiUserList['id'];
|
||||
|
||||
@ManyToOne(type => MiUserList, {
|
||||
@ManyToOne(() => MiUserList, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -21,7 +21,7 @@ export class MiUserListMembership {
|
||||
})
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -34,7 +34,7 @@ export class MiUserListMembership {
|
||||
})
|
||||
public userListId: MiUserList['id'];
|
||||
|
||||
@ManyToOne(type => MiUserList, {
|
||||
@ManyToOne(() => MiUserList, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -20,7 +20,7 @@ export class MiUserMemo {
|
||||
})
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -33,7 +33,7 @@ export class MiUserMemo {
|
||||
})
|
||||
public targetUserId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -18,7 +18,7 @@ export class MiUserNotePining {
|
||||
@Column(id())
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -27,7 +27,7 @@ export class MiUserNotePining {
|
||||
@Column(id())
|
||||
public noteId: MiNote['id'];
|
||||
|
||||
@ManyToOne(type => MiNote, {
|
||||
@ManyToOne(() => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -17,7 +17,7 @@ export class MiUserProfile {
|
||||
@PrimaryColumn(id())
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@OneToOne(type => MiUser, {
|
||||
@OneToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@@ -215,7 +215,7 @@ export class MiUserProfile {
|
||||
})
|
||||
public pinnedPageId: MiPage['id'] | null;
|
||||
|
||||
@OneToOne(type => MiPage, {
|
||||
@OneToOne(() => MiPage, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -12,7 +12,7 @@ export class MiUserPublickey {
|
||||
@PrimaryColumn(id())
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@OneToOne(type => MiUser, {
|
||||
@OneToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -18,7 +18,7 @@ export class MiUserSecurityKey {
|
||||
@Column(id())
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -22,7 +22,7 @@ export class MiWebhook {
|
||||
})
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => MiUser, {
|
||||
@ManyToOne(() => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
|
||||
@@ -618,6 +618,9 @@ export const packedMeDetailedOnlySchema = {
|
||||
achievementEarned: { optional: true, ...notificationRecieveConfig },
|
||||
app: { optional: true, ...notificationRecieveConfig },
|
||||
test: { optional: true, ...notificationRecieveConfig },
|
||||
login: { optional: true, ...notificationRecieveConfig },
|
||||
createToken: { optional: true, ...notificationRecieveConfig },
|
||||
exportCompleted: { optional: true, ...notificationRecieveConfig },
|
||||
},
|
||||
},
|
||||
emailNotificationTypes: {
|
||||
|
||||
@@ -123,8 +123,8 @@ export class ExportCustomEmojisProcessorService {
|
||||
metaStream.end();
|
||||
|
||||
// Create archive
|
||||
await new Promise<void>(async (resolve) => {
|
||||
const [archivePath, archiveCleanup] = await createTemp();
|
||||
const [archivePath, archiveCleanup] = await createTemp();
|
||||
await new Promise<void>((resolve) => {
|
||||
const archiveStream = fs.createWriteStream(archivePath);
|
||||
const archive = archiver('zip', {
|
||||
zlib: { level: 0 },
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user