forked from FoundKeyGang/FoundKey
server: add movedTo to packed user
This commit is contained in:
parent
e78069d904
commit
c1f7ad0c14
2 changed files with 5 additions and 0 deletions
|
@ -300,6 +300,10 @@ export const UserRepository = db.getRepository(User).extend({
|
||||||
}),
|
}),
|
||||||
emojis: populateEmojis(user.emojis, user.host),
|
emojis: populateEmojis(user.emojis, user.host),
|
||||||
onlineStatus: this.getOnlineStatus(user),
|
onlineStatus: this.getOnlineStatus(user),
|
||||||
|
movedTo: !user.movedToId ? undefined : this.pack(user.movedTo ?? user.movedToId, me, {
|
||||||
|
...opts,
|
||||||
|
detail: false,
|
||||||
|
}),
|
||||||
|
|
||||||
...(opts.detail ? {
|
...(opts.detail ? {
|
||||||
url: profile!.url,
|
url: profile!.url,
|
||||||
|
|
|
@ -28,6 +28,7 @@ export type UserLite = {
|
||||||
faviconUrl: Instance['faviconUrl'];
|
faviconUrl: Instance['faviconUrl'];
|
||||||
themeColor: Instance['themeColor'];
|
themeColor: Instance['themeColor'];
|
||||||
};
|
};
|
||||||
|
movedTo?: UserLite;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type UserDetailed = UserLite & {
|
export type UserDetailed = UserLite & {
|
||||||
|
|
Loading…
Reference in a new issue