merge: feat: Add Bio Length Setting (!1136)

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

Approved-by: dakkar <dakkar@thenautilus.net>
Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
Marie 2025-06-28 22:47:41 +00:00
commit f4fe14f5b7
14 changed files with 75 additions and 22 deletions

View file

@ -433,7 +433,7 @@ export type MiPartialRemoteUser = Partial<MiUser> & {
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;
export const descriptionSchema = { type: 'string', minLength: 1, maxLength: 1500 } as const;
export const descriptionSchema = { type: 'string', minLength: 1 } as const;
export const followedMessageSchema = { type: 'string', minLength: 1, maxLength: 256 } as const;
export const locationSchema = { type: 'string', minLength: 1, maxLength: 50 } as const;
export const listenbrainzSchema = { type: 'string', minLength: 1, maxLength: 128 } as const;

View file

@ -43,8 +43,8 @@ export class MiUserProfile {
})
public listenbrainz: string | null;
@Column('varchar', {
length: 2048, nullable: true,
@Column('text', {
nullable: true,
comment: 'The description (bio) of the User.',
})
public description: string | null;

View file

@ -206,6 +206,14 @@ export const packedMetaLiteSchema = {
type: 'number',
optional: false, nullable: false,
},
maxBioLength: {
type: 'number',
optional: false, nullable: false,
},
maxRemoteBioLength: {
type: 'number',
optional: false, nullable: false,
},
ads: {
type: 'array',
optional: false, nullable: false,