parent
705d40ab37
commit
3f71b14637
22 changed files with 249 additions and 214 deletions
|
|
@ -115,6 +115,7 @@ export class DriveFileRepository extends Repository<DriveFile> {
|
|||
md5: file.md5,
|
||||
size: file.size,
|
||||
isSensitive: file.isSensitive,
|
||||
blurhash: file.blurhash,
|
||||
properties: file.properties,
|
||||
url: opts.self ? file.url : this.getPublicUrl(file, false, meta),
|
||||
thumbnailUrl: this.getPublicUrl(file, true, meta),
|
||||
|
|
|
|||
|
|
@ -165,7 +165,8 @@ export class UserRepository extends Repository<User> {
|
|||
username: user.username,
|
||||
host: user.host,
|
||||
avatarUrl: user.avatarUrl ? user.avatarUrl : config.url + '/avatar/' + user.id,
|
||||
avatarColor: user.avatarColor,
|
||||
avatarBlurhash: user.avatarBlurhash,
|
||||
avatarColor: null, // 後方互換性のため
|
||||
isAdmin: user.isAdmin || falsy,
|
||||
isModerator: user.isModerator || falsy,
|
||||
isBot: user.isBot || falsy,
|
||||
|
|
@ -196,7 +197,8 @@ export class UserRepository extends Repository<User> {
|
|||
createdAt: user.createdAt.toISOString(),
|
||||
updatedAt: user.updatedAt ? user.updatedAt.toISOString() : null,
|
||||
bannerUrl: user.bannerUrl,
|
||||
bannerColor: user.bannerColor,
|
||||
bannerBlurhash: user.bannerBlurhash,
|
||||
bannerColor: null, // 後方互換性のため
|
||||
isLocked: user.isLocked,
|
||||
isModerator: user.isModerator || falsy,
|
||||
isSilenced: user.isSilenced || falsy,
|
||||
|
|
@ -331,7 +333,7 @@ export const packedUserSchema = {
|
|||
format: 'url',
|
||||
nullable: true as const, optional: false as const,
|
||||
},
|
||||
avatarColor: {
|
||||
avatarBlurhash: {
|
||||
type: 'any' as const,
|
||||
nullable: true as const, optional: false as const,
|
||||
},
|
||||
|
|
@ -340,7 +342,7 @@ export const packedUserSchema = {
|
|||
format: 'url',
|
||||
nullable: true as const, optional: true as const,
|
||||
},
|
||||
bannerColor: {
|
||||
bannerBlurhash: {
|
||||
type: 'any' as const,
|
||||
nullable: true as const, optional: true as const,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue