core: 修复drrdoc处uids获取

pull/81/head
undefined 4 years ago
parent 1b0bf4c37f
commit f58db3eeb2

@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "2.20.48",
"version": "2.20.49",
"bin": "bin/hydrooj.js",
"main": "dist/loader.js",
"typings": "dist/loader.d.ts",

@ -192,12 +192,12 @@ class DiscussionDetailHandler extends DiscussionHandler {
page,
system.get('pagination.reply'),
);
const uids = drdocs.map((drdoc) => drdoc.owner);
uids.push(this.ddoc.owner);
const uids = [
this.ddoc.owner,
...drdocs.map((drdoc) => drdoc.owner),
];
for (const drdoc of drdocs) {
if (drdoc.reply) {
drdocs.forEach((drrdoc) => uids.push(drrdoc.owner));
}
if (drdoc.reply) uids.push(...drdoc.reply.map((drrdoc) => drrdoc.owner));
}
const udict = await user.getList(domainId, uids);
const path = [

Loading…
Cancel
Save