move user.lastFetchedAt to UserLite
This commit is contained in:
parent
69402e3abb
commit
f163e15602
4 changed files with 9 additions and 8 deletions
|
|
@ -444,6 +444,7 @@ export class WebhookTestService {
|
||||||
...user,
|
...user,
|
||||||
createdAt: this.idService.parse(user.id).date.toISOString(),
|
createdAt: this.idService.parse(user.id).date.toISOString(),
|
||||||
updatedAt: null,
|
updatedAt: null,
|
||||||
|
lastFetchedAt: null,
|
||||||
id: user.id,
|
id: user.id,
|
||||||
name: user.name,
|
name: user.name,
|
||||||
username: user.username,
|
username: user.username,
|
||||||
|
|
|
||||||
|
|
@ -547,6 +547,7 @@ export class UserEntityService implements OnModuleInit {
|
||||||
description: mastoapi ? mastoapi.description : profile ? profile.description : '',
|
description: mastoapi ? mastoapi.description : profile ? profile.description : '',
|
||||||
createdAt: this.idService.parse(user.id).date.toISOString(),
|
createdAt: this.idService.parse(user.id).date.toISOString(),
|
||||||
updatedAt: user.updatedAt ? user.updatedAt.toISOString() : null,
|
updatedAt: user.updatedAt ? user.updatedAt.toISOString() : null,
|
||||||
|
lastFetchedAt: user.lastFetchedAt ? user.lastFetchedAt.toISOString() : null,
|
||||||
avatarDecorations: user.avatarDecorations.length > 0 ? this.avatarDecorationService.getAll().then(decorations => user.avatarDecorations.filter(ud => decorations.some(d => d.id === ud.id)).map(ud => ({
|
avatarDecorations: user.avatarDecorations.length > 0 ? this.avatarDecorationService.getAll().then(decorations => user.avatarDecorations.filter(ud => decorations.some(d => d.id === ud.id)).map(ud => ({
|
||||||
id: ud.id,
|
id: ud.id,
|
||||||
angle: ud.angle || undefined,
|
angle: ud.angle || undefined,
|
||||||
|
|
@ -602,7 +603,6 @@ export class UserEntityService implements OnModuleInit {
|
||||||
? Promise.all(user.alsoKnownAs.map(uri => Promise.resolve(opts.userIdsByUri?.get(uri) ?? this.apPersonService.fetchPerson(uri).then(user => user?.id).catch(() => null))))
|
? Promise.all(user.alsoKnownAs.map(uri => Promise.resolve(opts.userIdsByUri?.get(uri) ?? this.apPersonService.fetchPerson(uri).then(user => user?.id).catch(() => null))))
|
||||||
.then(xs => xs.length === 0 ? null : xs.filter(x => x != null))
|
.then(xs => xs.length === 0 ? null : xs.filter(x => x != null))
|
||||||
: null,
|
: null,
|
||||||
lastFetchedAt: user.lastFetchedAt ? user.lastFetchedAt.toISOString() : null,
|
|
||||||
bannerUrl: user.bannerId == null ? null : user.bannerUrl,
|
bannerUrl: user.bannerId == null ? null : user.bannerUrl,
|
||||||
bannerBlurhash: user.bannerId == null ? null : user.bannerBlurhash,
|
bannerBlurhash: user.bannerId == null ? null : user.bannerBlurhash,
|
||||||
backgroundUrl: user.backgroundId == null ? null : user.backgroundUrl,
|
backgroundUrl: user.backgroundId == null ? null : user.backgroundUrl,
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,11 @@ export const packedUserLiteSchema = {
|
||||||
nullable: true, optional: false,
|
nullable: true, optional: false,
|
||||||
format: 'date-time',
|
format: 'date-time',
|
||||||
},
|
},
|
||||||
|
lastFetchedAt: {
|
||||||
|
type: 'string',
|
||||||
|
nullable: true, optional: false,
|
||||||
|
format: 'date-time',
|
||||||
|
},
|
||||||
approved: {
|
approved: {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
nullable: false, optional: false,
|
nullable: false, optional: false,
|
||||||
|
|
@ -309,11 +314,6 @@ export const packedUserDetailedNotMeOnlySchema = {
|
||||||
nullable: false, optional: false,
|
nullable: false, optional: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
lastFetchedAt: {
|
|
||||||
type: 'string',
|
|
||||||
nullable: true, optional: false,
|
|
||||||
format: 'date-time',
|
|
||||||
},
|
|
||||||
bannerUrl: {
|
bannerUrl: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
format: 'url',
|
format: 'url',
|
||||||
|
|
|
||||||
|
|
@ -4256,6 +4256,8 @@ export type components = {
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
/** Format: date-time */
|
/** Format: date-time */
|
||||||
updatedAt: string | null;
|
updatedAt: string | null;
|
||||||
|
/** Format: date-time */
|
||||||
|
lastFetchedAt: string | null;
|
||||||
approved: boolean;
|
approved: boolean;
|
||||||
/** @example Hi masters, I am Ai! */
|
/** @example Hi masters, I am Ai! */
|
||||||
description: string | null;
|
description: string | null;
|
||||||
|
|
@ -4322,8 +4324,6 @@ export type components = {
|
||||||
/** Format: uri */
|
/** Format: uri */
|
||||||
movedTo: string | null;
|
movedTo: string | null;
|
||||||
alsoKnownAs: string[] | null;
|
alsoKnownAs: string[] | null;
|
||||||
/** Format: date-time */
|
|
||||||
lastFetchedAt: string | null;
|
|
||||||
/** Format: url */
|
/** Format: url */
|
||||||
bannerUrl: string | null;
|
bannerUrl: string | null;
|
||||||
bannerBlurhash: string | null;
|
bannerBlurhash: string | null;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue