fix: post queue notifs

fix moderators not showing up immediately when adding them
v1.18.x
Barış Soner Uşaklı 6 years ago
parent 2614a2e5ce
commit ac655564bb

@ -103,7 +103,7 @@ define('admin/manage/admins-mods', ['translator', 'benchpress', 'autocomplete'],
return; return;
} }
app.parseAndTranslate('admin/manage/admins-mods', 'globalMods', { globalMods: [ui.item.user] }, function (html) { app.parseAndTranslate('admin/manage/admins-mods', 'globalMods.members', { globalMods: { members: [ui.item.user] } }, function (html) {
$('.moderator-area[data-cid="' + cid + '"]').prepend(html); $('.moderator-area[data-cid="' + cid + '"]').prepend(html);
$('.no-moderator-warning[data-cid="' + cid + '"]').addClass('hidden'); $('.no-moderator-warning[data-cid="' + cid + '"]').addClass('hidden');
}); });

@ -67,7 +67,7 @@ module.exports = function (Posts) {
], next); ], next);
}, },
function (results, next) { function (results, next) {
next(null, _.union(results)); next(null, _.uniq(_.flattenDeep(results)));
}, },
], callback); ], callback);
} }

Loading…
Cancel
Save