fix(缺陷管理): 评论@用户消息通知有误
--bug=1039290 --user=宋昌昌 【消息管理】缺陷评论@用户a-用户a收到通知未显示@我的 https://www.tapd.cn/55049933/s/1498581
This commit is contained in:
parent
0023824099
commit
477b7fdae5
|
@ -208,11 +208,11 @@
|
||||||
</div>
|
</div>
|
||||||
<CommentInput
|
<CommentInput
|
||||||
v-if="activeTab === 'comment' && hasAnyPermission(['PROJECT_BUG:READ+COMMENT'])"
|
v-if="activeTab === 'comment' && hasAnyPermission(['PROJECT_BUG:READ+COMMENT'])"
|
||||||
|
v-model:notice-user-ids="noticeUserIds"
|
||||||
:content="commentContent"
|
:content="commentContent"
|
||||||
is-show-avatar
|
is-show-avatar
|
||||||
:upload-image="handleUploadImage"
|
:upload-image="handleUploadImage"
|
||||||
is-use-bottom
|
is-use-bottom
|
||||||
:notice-user-ids="noticeUserIds"
|
|
||||||
:preview-url="EditorPreviewFileUrl"
|
:preview-url="EditorPreviewFileUrl"
|
||||||
@publish="publishHandler"
|
@publish="publishHandler"
|
||||||
/>
|
/>
|
||||||
|
@ -612,20 +612,14 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
async function publishHandler(currentContent: string) {
|
async function publishHandler(currentContent: string) {
|
||||||
const regex = /data-id="([^"]*)"/g;
|
|
||||||
const matchesNotifier = currentContent.match(regex);
|
|
||||||
let notifiers = '';
|
|
||||||
if (matchesNotifier?.length) {
|
|
||||||
notifiers = matchesNotifier.map((match) => match.replace('data-id="', '').replace('"', '')).join(';');
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
const params = {
|
const params = {
|
||||||
bugId: detailInfo.value.id,
|
bugId: detailInfo.value.id,
|
||||||
notifier: notifiers,
|
notifier: noticeUserIds.value.join(';'),
|
||||||
replyUser: '',
|
replyUser: '',
|
||||||
parentId: '',
|
parentId: '',
|
||||||
content: currentContent,
|
content: currentContent,
|
||||||
event: notifiers ? 'AT' : 'COMMENT', // 任务事件(仅评论: ’COMMENT‘; 评论并@: ’AT‘; 回复评论/回复并@: ’REPLY‘;)
|
event: noticeUserIds.value.join(';') ? 'AT' : 'COMMENT', // 任务事件(仅评论: ’COMMENT‘; 评论并@: ’AT‘; 回复评论/回复并@: ’REPLY‘;)
|
||||||
};
|
};
|
||||||
await createOrUpdateComment(params as CommentParams);
|
await createOrUpdateComment(params as CommentParams);
|
||||||
Message.success(t('common.publishSuccessfully'));
|
Message.success(t('common.publishSuccessfully'));
|
||||||
|
|
Loading…
Reference in New Issue