mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: fix #113
This commit is contained in:
1 parent
fa4b7b6f33
commit
3383f5529b
10 files changed
+35
-22
No files matched your search
@@ -217,7 +217,7 @@ class DiscussionDetailHandler extends DiscussionHandler {
|
||||
const replies: Drdoc[] = await discussion.getMultiReply(domainId, did).toArray();
|
||||
const uids = new Set(replies.map((drdoc) => drdoc.owner));
|
||||
uids.delete(this.user._id);
|
||||
const str = JSON.stringify({ message: '{0} replied to discussion {1}{2}.', params: [this.user._id, domainId, did] });
|
||||
const str = JSON.stringify({ message: '{0} replied to discussion {1}/{2}.', params: [this.user._id, domainId, did] });
|
||||
const tasks = Array.from(uids).map((uid) => message.send(1, uid, str));
|
||||
await Promise.all(tasks);
|
||||
this.back();
|
||||
@@ -229,7 +229,7 @@ class DiscussionDetailHandler extends DiscussionHandler {
|
||||
this.checkPerm(PERM.PERM_REPLY_DISCUSSION);
|
||||
await this.limitRate('add_discussion', 3600, 60);
|
||||
await discussion.addTailReply(domainId, drid, this.user._id, content, this.request.ip);
|
||||
const str = JSON.stringify({ message: '{0} replied to discussion reply {1}{2}.', params: [this.user._id, domainId, drid] });
|
||||
const str = JSON.stringify({ message: '{0} replied to discussion reply {1}/{2}.', params: [this.user._id, domainId, drid] });
|
||||
if (this.drdoc.owner !== this.user._id) await message.send(1, this.drdoc.owner, str);
|
||||
this.back();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user