mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: await message.send in discussion
This commit is contained in:
1 file changed
+2
-6
@@ -238,9 +238,7 @@ class DiscussionDetailHandler extends DiscussionHandler {
|
||||
message: 'User {0} mentioned you in {1:link}',
|
||||
params: [this.user.uname, `/d/${domainId}${this.request.path}`],
|
||||
});
|
||||
for (const uid of uids) {
|
||||
message.send(1, uid, msg, message.FLAG_RICHTEXT | message.FLAG_UNREAD);
|
||||
}
|
||||
await Promise.all(uids.map((i) => message.send(1, i, msg, message.FLAG_RICHTEXT | message.FLAG_UNREAD)));
|
||||
const drid = await discussion.addReply(domainId, did, this.user._id, content, this.request.ip);
|
||||
this.back({ drid });
|
||||
}
|
||||
@@ -257,9 +255,7 @@ class DiscussionDetailHandler extends DiscussionHandler {
|
||||
message: 'User {0} mentioned you in {1:link}',
|
||||
params: [this.user.uname, `/d/${domainId}${this.request.path}`],
|
||||
});
|
||||
for (const uid of uids) {
|
||||
message.send(1, uid, msg, message.FLAG_RICHTEXT | message.FLAG_UNREAD);
|
||||
}
|
||||
await Promise.all(uids.map((i) => message.send(1, i, msg, message.FLAG_RICHTEXT | message.FLAG_UNREAD)));
|
||||
await discussion.addTailReply(domainId, drid, this.user._id, content, this.request.ip);
|
||||
this.back();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user