fix(teams): layout issues, error, change timezone format

This commit is contained in:
Sabe Jones
2021-07-27 10:12:29 -05:00
committed by SabreCat
parent 0806391ab8
commit f233c511cc
3 changed files with 54 additions and 48 deletions

View File

@@ -409,10 +409,7 @@ api.getGroup = {
}
const groupJson = await Group.toJSONCleanChat(group, user);
if (groupJson.leader === user._id) {
groupJson.purchased.plan = group.purchased.plan.toObject();
}
groupJson.purchased.plan = group.purchased.plan.toObject();
// Instead of populate we make a find call manually because of https://github.com/Automattic/mongoose/issues/3833
const leader = await User.findById(groupJson.leader).select(`${nameFields} preferences.timezoneOffset preferences.dayStart`).exec();