separate character limits for local and remote notes

This commit is contained in:
Hazel K 2024-10-07 21:03:31 -04:00 committed by Hazelnoot
parent 55df1ad10f
commit 560ee43dcf
19 changed files with 142 additions and 47 deletions

View file

@ -4,7 +4,6 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { DB_MAX_IMAGE_COMMENT_LENGTH } from '@/const.js';
import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiDriveFolder } from './DriveFolder.js';
@ -61,8 +60,7 @@ export class MiDriveFile {
})
public size: number;
@Column('varchar', {
length: DB_MAX_IMAGE_COMMENT_LENGTH,
@Column('text', {
nullable: true,
comment: 'The comment of the DriveFile.',
})

View file

@ -168,6 +168,18 @@ export const packedMetaLiteSchema = {
type: 'number',
optional: false, nullable: false,
},
maxRemoteNoteTextLength: {
type: 'number',
optional: false, nullable: false,
},
maxAltTextLength: {
type: 'number',
optional: false, nullable: false,
},
maxRemoteAltTextLength: {
type: 'number',
optional: false, nullable: false,
},
ads: {
type: 'array',
optional: false, nullable: false,