fix: #9204, bypass groupname length check for system group in upgrade script

v1.18.x
Barış Soner Uşaklı 4 years ago
parent 9938a139fe
commit 00ba89b6d6

@ -13,6 +13,9 @@ module.exports = {
timestamp: Date.UTC(2020, 9, 13),
method: async function () {
const progress = this.progress;
const maxGroupLength = meta.config.maximumGroupNameLength;
meta.config.maximumGroupNameLength = 30;
const timestamp = await db.getObjectField('group:administrators', 'timestamp');
const verifiedExists = await groups.exists('verified-users');
if (!verifiedExists) {
@ -38,7 +41,8 @@ module.exports = {
timestamp: timestamp + 1,
});
}
// restore setting
meta.config.maximumGroupNameLength = maxGroupLength;
await batch.processSortedSet('users:joindate', async function (uids) {
progress.incr(uids.length);
const userData = await user.getUsersFields(uids, ['uid', 'email:confirmed']);

Loading…
Cancel
Save