Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

update new question message tag

Neko81837c9fe05f
diff --git a/internal/service/content/question_service.go b/internal/service/content/question_service.go
index ec9ce48e..69f568c4 100644
--- a/internal/service/content/question_service.go
+++ b/internal/service/content/question_service.go
@@ -413,8 +413,15 @@ func (qs *QuestionService) AddQuestion(ctx context.Context, req *schema.Question
})
if question.Status == entity.QuestionStatusAvailable {
- qs.externalNotificationQueueService.Send(ctx,
- schema.CreateNewQuestionNotificationMsg(question.ID, question.Title, question.UserID, tags))
+ newTags, newTagsErr := qs.tagCommon.GetTagListByNames(ctx, tagNameList)
+ if newTagsErr != nil {
+ log.Error("get question newTags error %v", newTagsErr)
+ qs.externalNotificationQueueService.Send(ctx,
+ schema.CreateNewQuestionNotificationMsg(question.ID, question.Title, question.UserID, tags))
+ } else {
+ qs.externalNotificationQueueService.Send(ctx,
+ schema.CreateNewQuestionNotificationMsg(question.ID, question.Title, question.UserID, newTags))
+ }
}
qs.eventQueueService.Send(ctx, schema.NewEvent(constant.EventQuestionCreate, req.UserID).TID(question.ID).
QID(question.ID, question.UserID))