fix: #8836, truncate fullname

v1.18.x
Barış Soner Uşaklı 4 years ago
parent 064c99cd9f
commit 76cd5b0fc1

@ -16,7 +16,7 @@ module.exports = {
const userData = await user.getUsersFields(uids, ['uid', 'fullname']);
const bulkAdd = userData
.filter(u => u.uid && u.fullname)
.map(u => ['fullname:sorted', 0, u.fullname.toLowerCase() + ':' + u.uid]);
.map(u => ['fullname:sorted', 0, u.fullname.substr(0, 255).toLowerCase() + ':' + u.uid]);
await db.sortedSetAddBulk(bulkAdd);
}, {
batch: 500,

Loading…
Cancel
Save