mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 01:38:19 +08:00
core: discussion views (fix #69)
This commit is contained in:
1 parent
16fcd80a00
commit
2b8b9a776b
5 files changed
+29
-11
No files matched your search
@@ -187,6 +187,12 @@ class DiscussionDetailHandler extends DiscussionHandler {
|
||||
if (drdoc.reply) uids.push(...drdoc.reply.map((drrdoc) => drrdoc.owner));
|
||||
}
|
||||
const udict = await user.getList(domainId, uids);
|
||||
if (!dsdoc.view) {
|
||||
await Promise.all([
|
||||
discussion.inc(domainId, did, 'views', 1),
|
||||
discussion.setStatus(domainId, did, this.user._id, { view: true }),
|
||||
]);
|
||||
}
|
||||
const path = [
|
||||
['Hydro', 'homepage'],
|
||||
['discussion_main', 'discussion_main'],
|
||||
|
||||
Reference in new issue
Block a user