fix: status and groupTitle, if its not set

v1.18.x
Barış Soner Uşaklı 6 years ago
parent 2f0a331f02
commit e2e33dfb1e

@ -169,7 +169,7 @@ module.exports = function (User) {
user.picture = User.getDefaultAvatar(); user.picture = User.getDefaultAvatar();
} }
if (user.hasOwnProperty('status') && user.lastonline) { if (user.hasOwnProperty('status') && user.hasOwnProperty('lastonline')) {
user.status = User.getStatus(user); user.status = User.getStatus(user);
} }
@ -215,6 +215,7 @@ module.exports = function (User) {
if (user.groupTitle) { if (user.groupTitle) {
user.groupTitleArray = [user.groupTitle]; user.groupTitleArray = [user.groupTitle];
} else { } else {
user.groupTitle = '';
user.groupTitleArray = []; user.groupTitleArray = [];
} }
} }

Loading…
Cancel
Save