merge: Split character limits between local and remote notes (resolves #723) (!669)

View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/669

Closes #723

Approved-by: dakkar <dakkar@thenautilus.net>
Approved-by: Julia <julia@insertdomain.name>
This commit is contained in:
Julia 2024-10-29 03:04:25 +00:00
commit 1520bc1715
24 changed files with 244 additions and 68 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,26 @@ export const packedMetaLiteSchema = {
type: 'number',
optional: false, nullable: false,
},
maxRemoteNoteTextLength: {
type: 'number',
optional: false, nullable: false,
},
maxCwLength: {
type: 'number',
optional: false, nullable: false,
},
maxRemoteCwLength: {
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,