2023-07-27 00:31:52 -05:00
|
|
|
/*
|
2024-02-13 09:50:11 -06:00
|
|
|
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
2023-07-27 00:31:52 -05:00
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2019-04-07 07:50:36 -05:00
|
|
|
import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'typeorm';
|
2023-09-19 21:33:36 -05:00
|
|
|
import { id } from './util/id.js';
|
2023-08-16 03:51:28 -05:00
|
|
|
import { MiDriveFile } from './DriveFile.js';
|
2019-04-07 07:50:36 -05:00
|
|
|
|
2023-08-16 03:51:28 -05:00
|
|
|
@Entity('user')
|
2019-04-07 07:50:36 -05:00
|
|
|
@Index(['usernameLower', 'host'], { unique: true })
|
2023-08-16 03:51:28 -05:00
|
|
|
export class MiUser {
|
2019-04-07 07:50:36 -05:00
|
|
|
@PrimaryColumn(id())
|
|
|
|
public id: string;
|
|
|
|
|
|
|
|
@Index()
|
|
|
|
@Column('timestamp with time zone', {
|
|
|
|
nullable: true,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'The updated date of the User.',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
public updatedAt: Date | null;
|
|
|
|
|
|
|
|
@Column('timestamp with time zone', {
|
2021-12-09 08:58:30 -06:00
|
|
|
nullable: true,
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
public lastFetchedAt: Date | null;
|
|
|
|
|
2021-04-17 01:30:26 -05:00
|
|
|
@Index()
|
|
|
|
@Column('timestamp with time zone', {
|
2021-12-09 08:58:30 -06:00
|
|
|
nullable: true,
|
2021-04-17 01:30:26 -05:00
|
|
|
})
|
|
|
|
public lastActiveDate: Date | null;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public hideOnlineStatus: boolean;
|
|
|
|
|
2019-04-07 07:50:36 -05:00
|
|
|
@Column('varchar', {
|
|
|
|
length: 128,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'The username of the User.',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
public username: string;
|
|
|
|
|
|
|
|
@Index()
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 128, select: false,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'The username (lowercased) of the User.',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
public usernameLower: string;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 128, nullable: true,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'The name of the User.',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
public name: string | null;
|
|
|
|
|
|
|
|
@Column('integer', {
|
|
|
|
default: 0,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'The count of followers.',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
public followersCount: number;
|
|
|
|
|
|
|
|
@Column('integer', {
|
|
|
|
default: 0,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'The count of following.',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
public followingCount: number;
|
|
|
|
|
2023-04-08 00:16:26 -05:00
|
|
|
@Column('varchar', {
|
|
|
|
length: 512,
|
|
|
|
nullable: true,
|
|
|
|
comment: 'The URI of the new account of the User',
|
|
|
|
})
|
|
|
|
public movedToUri: string | null;
|
|
|
|
|
enhance: account migration (#10592)
* copy block and mute then create follow and unfollow jobs
* copy block and mute and update lists when detecting an account has moved
* no need to care promise orders
* refactor updating actor and target
* automatically accept if a locked account had accepted an old account
* fix exception format
* prevent the old account from calling some endpoints
* do not unfollow when moving
* adjust following and follower counts
* check movedToUri when receiving a follow request
* skip if no need to adjust
* Revert "disable account migration"
This reverts commit 2321214c98591bcfe1385c1ab5bf0ff7b471ae1d.
* fix translation specifier
* fix checking alsoKnownAs and uri
* fix updating account
* fix refollowing locked account
* decrease followersCount if followed by the old account
* adjust following and followers counts when unfollowing
* fix copying mutings
* prohibit moved account from moving again
* fix move service
* allow app creation after moving
* fix lint
* remove unnecessary field
* fix cache update
* add e2e test
* add e2e test of accepting the new account automatically
* force follow if any error happens
* remove unnecessary joins
* use Array.map instead of for const of
* ユーザーリストの移行は追加のみを行う
* nanka iroiro
* fix misskey-js?
* :v:
* 移行を行ったアカウントからのフォローリクエストの自動許可を調整
* newUriを外に出す
* newUriを外に出す2
* clean up
* fix newUri
* prevent moving if the destination account has already moved
* set alsoKnownAs via /i/update
* fix database initialization
* add return type
* prohibit updating alsoKnownAs after moving
* skip to add to alsoKnownAs if toUrl is known
* skip adding to the list if it already has
* use Acct.parse instead
* rename error code
* :art:
* 制限を5から10に緩和
* movedTo(Uri), alsoKnownAsはユーザーidを返すように
* test api res
* fix
* 元アカウントはミュートし続ける
* :art:
* unfollow
* fix
* getUserUriをUserEntityServiceに
* ?
* job!
* :art:
* instance => server
* accountMovedShort, forbiddenBecauseYouAreMigrated
* accountMovedShort
* fix test
* import, pin禁止
* 実績を凍結する
* clean up
* :v:
* change message
* ブロック, フォロー, ミュート, リストのインポートファイルの制限を32MiBに
* Revert "ブロック, フォロー, ミュート, リストのインポートファイルの制限を32MiBに"
This reverts commit 3bd7be35d8aa455cb01ae58f8172a71a50485db1.
* validateAlsoKnownAs
* 移行後2時間以内はインポート可能なファイルサイズを拡大
* clean up
* どうせactorをupdatePersonで更新するならupdatePersonしか移行処理を発行しないことにする
* handle error?
* リモートからの移行処理の条件を是正
* log, port
* fix
* fix
* enhance(dev): non-production環境でhttpサーバー間でもユーザー、ノートの連合が可能なように
* refactor (use checkHttps)
* MISSKEY_WEBFINGER_USE_HTTP
* Environment Variable readme
* NEVER USE IN PRODUCTION
* fix punyHost
* fix indent
* fix
* experimental
---------
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2023-04-29 10:09:29 -05:00
|
|
|
@Column('timestamp with time zone', {
|
|
|
|
nullable: true,
|
|
|
|
comment: 'When the user moved to another account',
|
|
|
|
})
|
|
|
|
public movedAt: Date | null;
|
|
|
|
|
2023-04-08 00:16:26 -05:00
|
|
|
@Column('simple-array', {
|
|
|
|
nullable: true,
|
|
|
|
comment: 'URIs the user is known as too',
|
|
|
|
})
|
|
|
|
public alsoKnownAs: string[] | null;
|
|
|
|
|
2019-04-07 07:50:36 -05:00
|
|
|
@Column('integer', {
|
|
|
|
default: 0,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'The count of notes.',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
public notesCount: number;
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
...id(),
|
|
|
|
nullable: true,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'The ID of avatar DriveFile.',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
2023-08-16 03:51:28 -05:00
|
|
|
public avatarId: MiDriveFile['id'] | null;
|
2019-04-07 07:50:36 -05:00
|
|
|
|
2023-08-16 03:51:28 -05:00
|
|
|
@OneToOne(type => MiDriveFile, {
|
2021-12-09 08:58:30 -06:00
|
|
|
onDelete: 'SET NULL',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
@JoinColumn()
|
2023-08-16 03:51:28 -05:00
|
|
|
public avatar: MiDriveFile | null;
|
2019-04-07 07:50:36 -05:00
|
|
|
|
|
|
|
@Column({
|
|
|
|
...id(),
|
|
|
|
nullable: true,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'The ID of banner DriveFile.',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
2023-08-16 03:51:28 -05:00
|
|
|
public bannerId: MiDriveFile['id'] | null;
|
2019-04-07 07:50:36 -05:00
|
|
|
|
2023-08-16 03:51:28 -05:00
|
|
|
@OneToOne(type => MiDriveFile, {
|
2021-12-09 08:58:30 -06:00
|
|
|
onDelete: 'SET NULL',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
@JoinColumn()
|
2023-08-16 03:51:28 -05:00
|
|
|
public banner: MiDriveFile | null;
|
2019-04-07 07:50:36 -05:00
|
|
|
|
2023-04-06 05:48:24 -05:00
|
|
|
@Column('varchar', {
|
|
|
|
length: 512, nullable: true,
|
|
|
|
})
|
|
|
|
public avatarUrl: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 512, nullable: true,
|
|
|
|
})
|
|
|
|
public bannerUrl: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 128, nullable: true,
|
|
|
|
})
|
|
|
|
public avatarBlurhash: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 128, nullable: true,
|
|
|
|
})
|
|
|
|
public bannerBlurhash: string | null;
|
|
|
|
|
2023-10-21 23:02:24 -05:00
|
|
|
@Column('jsonb', {
|
|
|
|
default: [],
|
|
|
|
})
|
|
|
|
public avatarDecorations: {
|
|
|
|
id: string;
|
2023-12-14 05:58:08 -06:00
|
|
|
angle?: number;
|
|
|
|
flipH?: boolean;
|
|
|
|
offsetX?: number;
|
|
|
|
offsetY?: number;
|
2023-10-21 23:02:24 -05:00
|
|
|
}[];
|
2023-10-21 04:38:07 -05:00
|
|
|
|
2019-04-07 07:50:36 -05:00
|
|
|
@Index()
|
|
|
|
@Column('varchar', {
|
2021-12-09 08:58:30 -06:00
|
|
|
length: 128, array: true, default: '{}',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
public tags: string[];
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'Whether the User is suspended.',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
public isSuspended: boolean;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'Whether the User is locked.',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
public isLocked: boolean;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'Whether the User is a bot.',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
public isBot: boolean;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'Whether the User is a cat.',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
public isCat: boolean;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
2023-01-12 06:02:26 -06:00
|
|
|
comment: 'Whether the User is the root.',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
2023-01-12 06:02:26 -06:00
|
|
|
public isRoot: boolean;
|
2019-04-07 07:50:36 -05:00
|
|
|
|
2020-12-11 06:16:20 -06:00
|
|
|
@Index()
|
|
|
|
@Column('boolean', {
|
|
|
|
default: true,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'Whether the User is explorable.',
|
2020-12-11 06:16:20 -06:00
|
|
|
})
|
|
|
|
public isExplorable: boolean;
|
|
|
|
|
2023-10-03 06:26:11 -05:00
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public isHibernated: boolean;
|
|
|
|
|
2021-08-20 22:41:56 -05:00
|
|
|
// アカウントが削除されたかどうかのフラグだが、完全に削除される際は物理削除なので実質削除されるまでの「削除が進行しているかどうか」のフラグ
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'Whether the User is deleted.',
|
2021-08-20 22:41:56 -05:00
|
|
|
})
|
|
|
|
public isDeleted: boolean;
|
|
|
|
|
2019-04-07 07:50:36 -05:00
|
|
|
@Column('varchar', {
|
2021-12-09 08:58:30 -06:00
|
|
|
length: 128, array: true, default: '{}',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
public emojis: string[];
|
|
|
|
|
|
|
|
@Index()
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 128, nullable: true,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'The host of the User. It will be null if the origin of the user is local.',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
public host: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2019-04-11 05:03:49 -05:00
|
|
|
length: 512, nullable: true,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'The inbox URL of the User. It will be null if the origin of the user is local.',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
public inbox: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2019-04-11 05:03:49 -05:00
|
|
|
length: 512, nullable: true,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'The sharedInbox URL of the User. It will be null if the origin of the user is local.',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
public sharedInbox: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2019-04-11 05:03:49 -05:00
|
|
|
length: 512, nullable: true,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'The featured URL of the User. It will be null if the origin of the user is local.',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
public featured: string | null;
|
|
|
|
|
|
|
|
@Index()
|
|
|
|
@Column('varchar', {
|
2019-04-11 05:03:49 -05:00
|
|
|
length: 512, nullable: true,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'The URI of the User. It will be null if the origin of the user is local.',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
public uri: string | null;
|
|
|
|
|
2021-02-05 20:50:33 -06:00
|
|
|
@Column('varchar', {
|
|
|
|
length: 512, nullable: true,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'The URI of the user Follower Collection. It will be null if the origin of the user is local.',
|
2021-02-05 20:50:33 -06:00
|
|
|
})
|
|
|
|
public followersUri: string | null;
|
|
|
|
|
2019-04-07 07:50:36 -05:00
|
|
|
@Index({ unique: true })
|
2019-04-08 06:29:52 -05:00
|
|
|
@Column('char', {
|
|
|
|
length: 16, nullable: true, unique: true,
|
2021-12-09 08:58:30 -06:00
|
|
|
comment: 'The native access token of the User. It will be null if the origin of the user is local.',
|
2019-04-07 07:50:36 -05:00
|
|
|
})
|
|
|
|
public token: string | null;
|
2019-04-11 11:52:25 -05:00
|
|
|
|
2023-08-16 03:51:28 -05:00
|
|
|
constructor(data: Partial<MiUser>) {
|
2019-04-11 11:52:25 -05:00
|
|
|
if (data == null) return;
|
|
|
|
|
|
|
|
for (const [k, v] of Object.entries(data)) {
|
|
|
|
(this as any)[k] = v;
|
|
|
|
}
|
|
|
|
}
|
2019-04-07 07:50:36 -05:00
|
|
|
}
|
|
|
|
|
2023-08-16 03:51:28 -05:00
|
|
|
export type MiLocalUser = MiUser & {
|
2019-04-07 07:50:36 -05:00
|
|
|
host: null;
|
2023-02-13 00:28:07 -06:00
|
|
|
uri: null;
|
2019-04-07 07:50:36 -05:00
|
|
|
}
|
|
|
|
|
2023-08-16 03:51:28 -05:00
|
|
|
export type MiPartialLocalUser = Partial<MiUser> & {
|
|
|
|
id: MiUser['id'];
|
enhance: account migration (#10592)
* copy block and mute then create follow and unfollow jobs
* copy block and mute and update lists when detecting an account has moved
* no need to care promise orders
* refactor updating actor and target
* automatically accept if a locked account had accepted an old account
* fix exception format
* prevent the old account from calling some endpoints
* do not unfollow when moving
* adjust following and follower counts
* check movedToUri when receiving a follow request
* skip if no need to adjust
* Revert "disable account migration"
This reverts commit 2321214c98591bcfe1385c1ab5bf0ff7b471ae1d.
* fix translation specifier
* fix checking alsoKnownAs and uri
* fix updating account
* fix refollowing locked account
* decrease followersCount if followed by the old account
* adjust following and followers counts when unfollowing
* fix copying mutings
* prohibit moved account from moving again
* fix move service
* allow app creation after moving
* fix lint
* remove unnecessary field
* fix cache update
* add e2e test
* add e2e test of accepting the new account automatically
* force follow if any error happens
* remove unnecessary joins
* use Array.map instead of for const of
* ユーザーリストの移行は追加のみを行う
* nanka iroiro
* fix misskey-js?
* :v:
* 移行を行ったアカウントからのフォローリクエストの自動許可を調整
* newUriを外に出す
* newUriを外に出す2
* clean up
* fix newUri
* prevent moving if the destination account has already moved
* set alsoKnownAs via /i/update
* fix database initialization
* add return type
* prohibit updating alsoKnownAs after moving
* skip to add to alsoKnownAs if toUrl is known
* skip adding to the list if it already has
* use Acct.parse instead
* rename error code
* :art:
* 制限を5から10に緩和
* movedTo(Uri), alsoKnownAsはユーザーidを返すように
* test api res
* fix
* 元アカウントはミュートし続ける
* :art:
* unfollow
* fix
* getUserUriをUserEntityServiceに
* ?
* job!
* :art:
* instance => server
* accountMovedShort, forbiddenBecauseYouAreMigrated
* accountMovedShort
* fix test
* import, pin禁止
* 実績を凍結する
* clean up
* :v:
* change message
* ブロック, フォロー, ミュート, リストのインポートファイルの制限を32MiBに
* Revert "ブロック, フォロー, ミュート, リストのインポートファイルの制限を32MiBに"
This reverts commit 3bd7be35d8aa455cb01ae58f8172a71a50485db1.
* validateAlsoKnownAs
* 移行後2時間以内はインポート可能なファイルサイズを拡大
* clean up
* どうせactorをupdatePersonで更新するならupdatePersonしか移行処理を発行しないことにする
* handle error?
* リモートからの移行処理の条件を是正
* log, port
* fix
* fix
* enhance(dev): non-production環境でhttpサーバー間でもユーザー、ノートの連合が可能なように
* refactor (use checkHttps)
* MISSKEY_WEBFINGER_USE_HTTP
* Environment Variable readme
* NEVER USE IN PRODUCTION
* fix punyHost
* fix indent
* fix
* experimental
---------
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2023-04-29 10:09:29 -05:00
|
|
|
host: null;
|
|
|
|
uri: null;
|
|
|
|
}
|
|
|
|
|
2023-08-16 03:51:28 -05:00
|
|
|
export type MiRemoteUser = MiUser & {
|
2019-04-07 07:50:36 -05:00
|
|
|
host: string;
|
2023-02-12 03:47:30 -06:00
|
|
|
uri: string;
|
2019-04-07 07:50:36 -05:00
|
|
|
}
|
2022-03-25 02:27:41 -05:00
|
|
|
|
2023-08-16 03:51:28 -05:00
|
|
|
export type MiPartialRemoteUser = Partial<MiUser> & {
|
|
|
|
id: MiUser['id'];
|
enhance: account migration (#10592)
* copy block and mute then create follow and unfollow jobs
* copy block and mute and update lists when detecting an account has moved
* no need to care promise orders
* refactor updating actor and target
* automatically accept if a locked account had accepted an old account
* fix exception format
* prevent the old account from calling some endpoints
* do not unfollow when moving
* adjust following and follower counts
* check movedToUri when receiving a follow request
* skip if no need to adjust
* Revert "disable account migration"
This reverts commit 2321214c98591bcfe1385c1ab5bf0ff7b471ae1d.
* fix translation specifier
* fix checking alsoKnownAs and uri
* fix updating account
* fix refollowing locked account
* decrease followersCount if followed by the old account
* adjust following and followers counts when unfollowing
* fix copying mutings
* prohibit moved account from moving again
* fix move service
* allow app creation after moving
* fix lint
* remove unnecessary field
* fix cache update
* add e2e test
* add e2e test of accepting the new account automatically
* force follow if any error happens
* remove unnecessary joins
* use Array.map instead of for const of
* ユーザーリストの移行は追加のみを行う
* nanka iroiro
* fix misskey-js?
* :v:
* 移行を行ったアカウントからのフォローリクエストの自動許可を調整
* newUriを外に出す
* newUriを外に出す2
* clean up
* fix newUri
* prevent moving if the destination account has already moved
* set alsoKnownAs via /i/update
* fix database initialization
* add return type
* prohibit updating alsoKnownAs after moving
* skip to add to alsoKnownAs if toUrl is known
* skip adding to the list if it already has
* use Acct.parse instead
* rename error code
* :art:
* 制限を5から10に緩和
* movedTo(Uri), alsoKnownAsはユーザーidを返すように
* test api res
* fix
* 元アカウントはミュートし続ける
* :art:
* unfollow
* fix
* getUserUriをUserEntityServiceに
* ?
* job!
* :art:
* instance => server
* accountMovedShort, forbiddenBecauseYouAreMigrated
* accountMovedShort
* fix test
* import, pin禁止
* 実績を凍結する
* clean up
* :v:
* change message
* ブロック, フォロー, ミュート, リストのインポートファイルの制限を32MiBに
* Revert "ブロック, フォロー, ミュート, リストのインポートファイルの制限を32MiBに"
This reverts commit 3bd7be35d8aa455cb01ae58f8172a71a50485db1.
* validateAlsoKnownAs
* 移行後2時間以内はインポート可能なファイルサイズを拡大
* clean up
* どうせactorをupdatePersonで更新するならupdatePersonしか移行処理を発行しないことにする
* handle error?
* リモートからの移行処理の条件を是正
* log, port
* fix
* fix
* enhance(dev): non-production環境でhttpサーバー間でもユーザー、ノートの連合が可能なように
* refactor (use checkHttps)
* MISSKEY_WEBFINGER_USE_HTTP
* Environment Variable readme
* NEVER USE IN PRODUCTION
* fix punyHost
* fix indent
* fix
* experimental
---------
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2023-04-29 10:09:29 -05:00
|
|
|
host: string;
|
|
|
|
uri: string;
|
|
|
|
}
|
|
|
|
|
2022-09-17 13:27:08 -05:00
|
|
|
export const localUsernameSchema = { type: 'string', pattern: /^\w{1,20}$/.toString().slice(1, -1) } as const;
|
|
|
|
export const passwordSchema = { type: 'string', minLength: 1 } as const;
|
|
|
|
export const nameSchema = { type: 'string', minLength: 1, maxLength: 50 } as const;
|
2023-01-15 15:05:58 -06:00
|
|
|
export const descriptionSchema = { type: 'string', minLength: 1, maxLength: 1500 } as const;
|
2022-09-17 13:27:08 -05:00
|
|
|
export const locationSchema = { type: 'string', minLength: 1, maxLength: 50 } as const;
|
|
|
|
export const birthdaySchema = { type: 'string', pattern: /^([0-9]{4})-([0-9]{2})-([0-9]{2})$/.toString().slice(1, -1) } as const;
|