mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
fix: return full inbox on user-v3-api (#12146)
* fix inbox on user-v3-api + test * add @benkelaar suggestions
This commit is contained in:
@@ -497,7 +497,9 @@ schema.methods.toJSONWithInbox = async function userToJSONWithInbox () {
|
||||
const toJSON = user.toJSON();
|
||||
|
||||
if (toJSON.inbox) {
|
||||
toJSON.inbox.messages = await inboxLib.getUserInbox(user, { asArray: false });
|
||||
toJSON.inbox.messages = await inboxLib.getUserInbox(user, {
|
||||
asArray: false,
|
||||
});
|
||||
}
|
||||
|
||||
return toJSON;
|
||||
|
||||
Reference in New Issue
Block a user