Merge branch 'develop' into upstream/2025.5.0
This commit is contained in:
commit
46bb75d274
116 changed files with 2636 additions and 973 deletions
|
|
@ -22,7 +22,7 @@ export class MiAbuseReportNotificationRecipient {
|
|||
/**
|
||||
* 有効かどうか.
|
||||
*/
|
||||
@Index()
|
||||
@Index('IDX_abuse_report_notification_recipient_isActive')
|
||||
@Column('boolean', {
|
||||
default: true,
|
||||
})
|
||||
|
|
@ -47,7 +47,7 @@ export class MiAbuseReportNotificationRecipient {
|
|||
/**
|
||||
* 通知方法.
|
||||
*/
|
||||
@Index()
|
||||
@Index('IDX_abuse_report_notification_recipient_method')
|
||||
@Column('varchar', {
|
||||
length: 64,
|
||||
})
|
||||
|
|
@ -56,7 +56,7 @@ export class MiAbuseReportNotificationRecipient {
|
|||
/**
|
||||
* 通知先のユーザID.
|
||||
*/
|
||||
@Index()
|
||||
@Index('IDX_abuse_report_notification_recipient_userId')
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
|
|
@ -75,14 +75,16 @@ export class MiAbuseReportNotificationRecipient {
|
|||
/**
|
||||
* 通知先のユーザプロフィール.
|
||||
*/
|
||||
@ManyToOne(type => MiUserProfile, {})
|
||||
@ManyToOne(type => MiUserProfile, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn({ name: 'userId', referencedColumnName: 'userId', foreignKeyConstraintName: 'FK_abuse_report_notification_recipient_userId2' })
|
||||
public userProfile: MiUserProfile | null;
|
||||
|
||||
/**
|
||||
* 通知先のシステムWebhookId.
|
||||
*/
|
||||
@Index()
|
||||
@Index('IDX_abuse_report_notification_recipient_systemWebhookId')
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
|
|
@ -95,6 +97,8 @@ export class MiAbuseReportNotificationRecipient {
|
|||
@ManyToOne(type => MiSystemWebhook, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@JoinColumn({
|
||||
foreignKeyConstraintName: 'FK_abuse_report_notification_recipient_systemWebhookId',
|
||||
})
|
||||
public systemWebhook: MiSystemWebhook | null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ export class MiEmoji {
|
|||
})
|
||||
public host: string | null;
|
||||
|
||||
@Index('IDX_EMOJI_CATEGORY')
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
})
|
||||
|
|
@ -77,6 +78,8 @@ export class MiEmoji {
|
|||
public isSensitive: boolean;
|
||||
|
||||
// TODO: 定期ジョブで存在しなくなったロールIDを除去するようにする
|
||||
// Synchronize: false is needed because TypeORM doesn't understand GIN indexes
|
||||
@Index('IDX_EMOJI_ROLE_IDS', { synchronize: false })
|
||||
@Column('varchar', {
|
||||
array: true, length: 128, default: '{}',
|
||||
})
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ export class SkLatestNote {
|
|||
})
|
||||
@JoinColumn({
|
||||
name: 'user_id',
|
||||
foreignKeyConstraintName: 'FK_20e346fffe4a2174585005d6d80',
|
||||
})
|
||||
public user: MiUser | null;
|
||||
|
||||
|
|
@ -60,6 +61,7 @@ export class SkLatestNote {
|
|||
})
|
||||
@JoinColumn({
|
||||
name: 'note_id',
|
||||
foreignKeyConstraintName: 'FK_47a38b1c13de6ce4e5090fb1acd',
|
||||
})
|
||||
public note: MiNote | null;
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ export class MiMeta {
|
|||
public maintainerEmail: string | null;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
default: true,
|
||||
})
|
||||
public disableRegistration: boolean;
|
||||
|
||||
|
|
@ -382,6 +382,12 @@ export class MiMeta {
|
|||
})
|
||||
public swPrivateKey: string | null;
|
||||
|
||||
@Column('integer', {
|
||||
default: 5000,
|
||||
comment: 'Timeout in milliseconds for translation API requests',
|
||||
})
|
||||
public translationTimeout: number;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 1024,
|
||||
nullable: true,
|
||||
|
|
@ -425,7 +431,7 @@ export class MiMeta {
|
|||
@Column('varchar', {
|
||||
length: 1024,
|
||||
default: 'https://activitypub.software/TransFem-org/Sharkey/',
|
||||
nullable: false,
|
||||
nullable: true,
|
||||
})
|
||||
public repositoryUrl: string | null;
|
||||
|
||||
|
|
@ -612,8 +618,8 @@ export class MiMeta {
|
|||
})
|
||||
public enableAchievements: boolean;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 2048, nullable: true,
|
||||
@Column('text', {
|
||||
nullable: true,
|
||||
})
|
||||
public robotsTxt: string | null;
|
||||
|
||||
|
|
@ -643,7 +649,7 @@ export class MiMeta {
|
|||
public bannedEmailDomains: string[];
|
||||
|
||||
@Column('varchar', {
|
||||
length: 1024, array: true, default: '{ "admin", "administrator", "root", "system", "maintainer", "host", "mod", "moderator", "owner", "superuser", "staff", "auth", "i", "me", "everyone", "all", "mention", "mentions", "example", "user", "users", "account", "accounts", "official", "help", "helps", "support", "supports", "info", "information", "informations", "announce", "announces", "announcement", "announcements", "notice", "notification", "notifications", "dev", "developer", "developers", "tech", "misskey" }',
|
||||
length: 1024, array: true, default: '{admin,administrator,root,system,maintainer,host,mod,moderator,owner,superuser,staff,auth,i,me,everyone,all,mention,mentions,example,user,users,account,accounts,official,help,helps,support,supports,info,information,informations,announce,announces,announcement,announcements,notice,notification,notifications,dev,developer,developers,tech,misskey}',
|
||||
})
|
||||
public preservedUsernames: string[];
|
||||
|
||||
|
|
@ -658,22 +664,22 @@ export class MiMeta {
|
|||
public enableFanoutTimelineDbFallback: boolean;
|
||||
|
||||
@Column('integer', {
|
||||
default: 300,
|
||||
default: 800,
|
||||
})
|
||||
public perLocalUserUserTimelineCacheMax: number;
|
||||
|
||||
@Column('integer', {
|
||||
default: 100,
|
||||
default: 800,
|
||||
})
|
||||
public perRemoteUserUserTimelineCacheMax: number;
|
||||
|
||||
@Column('integer', {
|
||||
default: 300,
|
||||
default: 800,
|
||||
})
|
||||
public perUserHomeTimelineCacheMax: number;
|
||||
|
||||
@Column('integer', {
|
||||
default: 300,
|
||||
default: 800,
|
||||
})
|
||||
public perUserListTimelineCacheMax: number;
|
||||
|
||||
|
|
@ -689,9 +695,9 @@ export class MiMeta {
|
|||
|
||||
@Column('varchar', {
|
||||
length: 500,
|
||||
nullable: true,
|
||||
default: '❤️',
|
||||
})
|
||||
public defaultLike: string | null;
|
||||
public defaultLike: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 256, array: true, default: '{}',
|
||||
|
|
@ -714,7 +720,7 @@ export class MiMeta {
|
|||
public urlPreviewMaximumContentLength: number;
|
||||
|
||||
@Column('boolean', {
|
||||
default: true,
|
||||
default: false,
|
||||
})
|
||||
public urlPreviewRequireContentLength: boolean;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import type { MiDriveFile } from './DriveFile.js';
|
|||
// You should not use `@Index({ concurrent: true })` decorator because database initialization for test will fail
|
||||
// because it will always run CREATE INDEX in transaction based on decorators.
|
||||
// Not appending `{ concurrent: true }` to `@Index` will not cause any problem in production,
|
||||
@Index(['userId', 'id'])
|
||||
@Index('IDX_724b311e6f883751f261ebe378', ['userId', 'id'])
|
||||
@Entity('note')
|
||||
export class MiNote {
|
||||
@PrimaryColumn(id())
|
||||
|
|
@ -273,3 +273,7 @@ export type IMentionedRemoteUsers = {
|
|||
username: string;
|
||||
host: string;
|
||||
}[];
|
||||
|
||||
export function hasText(note: MiNote): note is MiNote & { text: string } {
|
||||
return note.text != null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,7 +129,9 @@ export class MiUser {
|
|||
@OneToOne(() => MiDriveFile, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
@JoinColumn({
|
||||
foreignKeyConstraintName: 'FK_q5lm0tbgejtfskzg0rc4wd7t1n',
|
||||
})
|
||||
public background: MiDriveFile | null;
|
||||
|
||||
// avatarId が null になったとしてもこれが null でない可能性があるため、このフィールドを使うときは avatarId の non-null チェックをすること
|
||||
|
|
@ -345,7 +347,7 @@ export class MiUser {
|
|||
*/
|
||||
@Column('boolean', {
|
||||
name: 'enable_rss',
|
||||
default: true,
|
||||
default: false,
|
||||
})
|
||||
public enableRss: boolean;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@ export class MiUserListMembership {
|
|||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@JoinColumn({
|
||||
foreignKeyConstraintName: 'FK_d844bfc6f3f523a05189076efaa',
|
||||
})
|
||||
public user: MiUser | null;
|
||||
|
||||
@Index()
|
||||
|
|
@ -37,7 +39,9 @@ export class MiUserListMembership {
|
|||
@ManyToOne(type => MiUserList, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
@JoinColumn({
|
||||
foreignKeyConstraintName: 'FK_605472305f26818cc93d1baaa74',
|
||||
})
|
||||
public userList: MiUserList | null;
|
||||
|
||||
// タイムラインにその人のリプライまで含めるかどうか
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ export class MiUserPending {
|
|||
|
||||
@Column('varchar', {
|
||||
length: 1000,
|
||||
nullable: true,
|
||||
})
|
||||
public reason: string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,12 +110,14 @@ export class MiUserProfile {
|
|||
|
||||
@Column('enum', {
|
||||
enum: followingVisibilities,
|
||||
enumName: 'user_profile_followingVisibility_enum',
|
||||
default: 'public',
|
||||
})
|
||||
public followingVisibility: typeof followingVisibilities[number];
|
||||
|
||||
@Column('enum', {
|
||||
enum: followersVisibilities,
|
||||
enumName: 'user_profile_followersVisibility_enum',
|
||||
default: 'public',
|
||||
})
|
||||
public followersVisibility: typeof followersVisibilities[number];
|
||||
|
|
|
|||
|
|
@ -309,6 +309,10 @@ export const packedRolePoliciesSchema = {
|
|||
optional: false, nullable: false,
|
||||
enum: ['available', 'readonly', 'unavailable'],
|
||||
},
|
||||
canTrend: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue