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.

feat: activity object info return display name

LinkinStarc455f3f02bdf
diff --git a/internal/schema/activity.go b/internal/schema/activity.go
index e1e6e3c3..be90a845 100644
--- a/internal/schema/activity.go
+++ b/internal/schema/activity.go
@@ -42,11 +42,12 @@ type ActObjectTimeline struct {
// ActObjectInfo act object info
type ActObjectInfo struct {
- Title string `json:"title"`
- ObjectType string `json:"object_type"`
- QuestionID string `json:"question_id"`
- AnswerID string `json:"answer_id"`
- Username string `json:"username"`
+ Title string `json:"title"`
+ ObjectType string `json:"object_type"`
+ QuestionID string `json:"question_id"`
+ AnswerID string `json:"answer_id"`
+ Username string `json:"username"`
+ DisplayName string `json:"display_name"`
}
// GetObjectTimelineDetailReq get object timeline detail request
diff --git a/internal/service/activity/activity.go b/internal/service/activity/activity.go
index 72fc0ad6..2ef56a9c 100644
--- a/internal/service/activity/activity.go
+++ b/internal/service/activity/activity.go
@@ -80,6 +80,7 @@ func (as *ActivityService) GetObjectTimeline(ctx context.Context, req *schema.Ge
}
if exist {
resp.ObjectInfo.Username = userBasicInfo.Username
+ resp.ObjectInfo.DisplayName = userBasicInfo.DisplayName
}
}