v1.18.x
Julian Lam 7 years ago
parent 4bb46ad669
commit 541aa7fbc6

@ -1,6 +1,7 @@
{
"banned": "Banned",
"offline": "Offline",
"deleted": "Deleted",
"username": "User Name",
"joindate": "Join Date",
"postcount": "Post Count",

@ -51,11 +51,14 @@ module.exports = function (Messaging) {
return msg && msg.fromuid;
});
user.getUsersFields(uids, ['uid', 'username', 'userslug', 'picture', 'status'], next);
user.getUsersFields(uids, ['uid', 'username', 'userslug', 'picture', 'status', 'banned'], next);
},
function (users, next) {
messages.forEach(function (message, index) {
message.fromUser = users[index];
message.fromUser.banned = !!parseInt(message.fromUser.banned, 10);
message.fromUser.deleted = parseInt(message.fromuid, 10) !== message.fromUser.uid && message.fromUser.uid === 0;
var self = parseInt(message.fromuid, 10) === parseInt(uid, 10);
message.self = self ? 1 : 0;
message.timestampISO = utils.toISOString(message.timestamp);

Loading…
Cancel
Save