server: add movedTo to packed user

This commit is contained in:
Johann150 2022-11-22 15:55:59 +01:00
parent e78069d904
commit c1f7ad0c14
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1
2 changed files with 5 additions and 0 deletions

View file

@ -300,6 +300,10 @@ export const UserRepository = db.getRepository(User).extend({
}),
emojis: populateEmojis(user.emojis, user.host),
onlineStatus: this.getOnlineStatus(user),
movedTo: !user.movedToId ? undefined : this.pack(user.movedTo ?? user.movedToId, me, {
...opts,
detail: false,
}),
...(opts.detail ? {
url: profile!.url,

View file

@ -28,6 +28,7 @@ export type UserLite = {
faviconUrl: Instance['faviconUrl'];
themeColor: Instance['themeColor'];
};
movedTo?: UserLite;
};
export type UserDetailed = UserLite & {