halo-dev / halo-dev/plugin-comment-widget

get /apis/api.halo.run/v1alpha1/comments 评论接口返回的数据作者只有 displayName,name 字段为空,希望接口能拿到用户名,因为需要这个做文章评论后可见,而 displayName 会重复

Open
#123 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
25
Forks
32
Avg merge
11h 21m
Merged PRs (30d)
25

Description

测试地址:https://www.qiushaocloud.top/extras/message-board

结果例如:
{
"metadata": {
"finalizers": [
"comment-protection"
],
"name": "c2f042c4-3d21-43ce-ac9c-a473490861ed",
"annotations": {},
"version": 4,
"creationTimestamp": "2024-04-27T02:07:59.046241468Z"
},
"spec": {
"raw": "申请格式\n< 博客名称 + 博客地址 + 博客Logo + 博客简介 >\n(大家到留言栏目里留言哦)\n\n博客名称: 邱少羽梦\n博客地址: https://www.qiushaocloud.top\n博客Logo:https://www.qiushaocloud.top/logo\n博客简介:90后音视频开发工程师分享程序之道,也分享一些其它有用的技术,相信分享让您我更亲近",
"content": "申请格式\n< 博客名称 + 博客地址 + 博客Logo + 博客简介 >\n(大家到留言栏目里留言哦)\n\n博客名称: 邱少羽梦\n博客地址: https://www.qiushaocloud.top\n博客Logo:https://www.qiushaocloud.top/logo\n博客简介:90后音视频开发工程师分享程序之道,也分享一些其它有用的技术,相信分享让您我更亲近",
"owner": {
"kind": "User",
"name": "",
"displayName": "邱少羽梦",
"annotations": {
"email-hash": "f600843cfdb25c5708359d00656c423b"
}
},
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
"ipAddress": "",
"approvedTime": "2024-04-27T02:07:59.046149120Z",
"creationTime": "2024-04-27T02:07:59.044756512Z",
"priority": 0,
"top": false,
"allowNotification": true,
"approved": true,
"hidden": false,
"subjectRef": {
"group": "content.halo.run",
"version": "v1alpha1",
"kind": "SinglePage",
"name": "4"
}
},
"status": {
"replyCount": 0,
"visibleReplyCount": 0,
"unreadReplyCount": 0,
"hasNewReply": false,
"observedVersion": 4
},
"owner": {
"kind": "User",
"displayName": "邱少羽梦",
"avatar": "/upload/3294376e-b68c-43a2-8af5-12770f2cd8f0.png"
},
"stats": {
"upvote": 0
},
"replies": {
"page": 1,
"size": 5,
"total": 0,
"items": [],
"first": true,
"last": true,
"hasNext": false,
"hasPrevious": false,
"totalPages": 0
}
}

我的站点环境

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the response from GET /apis/api.halo.run/v1alpha1/comments using the example environment and inspect how the comment owner is serialized. Trace the owner data from the comment API entry point to the response model. Done means the response includes a usable, non-empty username in owner.name while retaining the displayName.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.