From 080040579fee71ddf9d996ec5c083f78a36078d7 Mon Sep 17 00:00:00 2001 From: undefined Date: Fri, 13 May 2022 21:43:10 +0800 Subject: [PATCH] core: fix mention link --- packages/hydrooj/package.json | 2 +- packages/hydrooj/src/handler/discussion.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/hydrooj/package.json b/packages/hydrooj/package.json index 3094cfae0..408f014c2 100644 --- a/packages/hydrooj/package.json +++ b/packages/hydrooj/package.json @@ -1,6 +1,6 @@ { "name": "hydrooj", - "version": "3.13.6", + "version": "3.13.7", "bin": "bin/hydrooj.js", "main": "src/loader", "module": "src/loader", diff --git a/packages/hydrooj/src/handler/discussion.ts b/packages/hydrooj/src/handler/discussion.ts index 98b39e9f4..7b4743445 100644 --- a/packages/hydrooj/src/handler/discussion.ts +++ b/packages/hydrooj/src/handler/discussion.ts @@ -240,7 +240,7 @@ class DiscussionDetailHandler extends DiscussionHandler { const uids = Object.keys(await user.getList(domainId, Array.from(targets))).map((i) => +i); const msg = JSON.stringify({ message: 'User {0} mentioned you in {1:link}', - params: [this.user.uname, this.request.path], + 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); @@ -259,7 +259,7 @@ class DiscussionDetailHandler extends DiscussionHandler { const uids = Object.keys(await user.getList(domainId, Array.from(targets))).map((i) => +i); const msg = JSON.stringify({ message: 'User {0} mentioned you in {1:link}', - params: [this.user.uname, this.request.path], + 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);