Implement #2736
This commit is contained in:
parent
195f676500
commit
d9f0e158a3
25 changed files with 239 additions and 39 deletions
|
@ -348,7 +348,8 @@ export const pack = (
|
|||
me?: string | mongo.ObjectID | IUser,
|
||||
options?: {
|
||||
detail?: boolean,
|
||||
includeSecrets?: boolean
|
||||
includeSecrets?: boolean,
|
||||
includeHasUnreadNotes?: boolean
|
||||
}
|
||||
) => new Promise<any>(async (resolve, reject) => {
|
||||
|
||||
|
@ -510,6 +511,11 @@ export const pack = (
|
|||
}
|
||||
}
|
||||
|
||||
if (!opts.includeHasUnreadNotes) {
|
||||
delete _user.hasUnreadSpecifiedNotes;
|
||||
delete _user.hasUnreadMentions;
|
||||
}
|
||||
|
||||
// resolve promises in _user object
|
||||
_user = await rap(_user);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue