fix: GetMsg returns group_name when message's type is Group.#609
Merged
Conversation
Contributor
审阅者指南(在小型 PRs 上折叠)审阅者指南通过将
|
| 变更项 | 详情 | 文件 |
|---|---|---|
在 GetMsg 返回的群组消息中添加 group_name 字段 |
|
src/onebot11/entities.tssrc/onebot11/types.ts |
可能关联的问题
- #0: 此 PR 为群组消息添加了
group_name字段,直接解决了该问题的请求。
提示与命令
与 Sourcery 互动
- 触发新审阅: 在拉取请求上评论
@sourcery-ai review。 - 继续讨论: 直接回复 Sourcery 的审阅评论。
- 从审阅评论生成 GitHub 问题: 通过回复审阅评论,要求 Sourcery 从中创建问题。您也可以回复审阅评论并添加
@sourcery-ai issue来创建问题。 - 生成拉取请求标题: 随时在拉取请求标题的任意位置写入
@sourcery-ai以生成标题。您也可以在拉取请求上评论@sourcery-ai title以随时(重新)生成标题。 - 生成拉取请求摘要: 随时在拉取请求正文的任意位置写入
@sourcery-ai summary以在您想要的位置生成 PR 摘要。您也可以在拉取请求上评论@sourcery-ai summary以随时(重新)生成摘要。 - 生成审阅者指南: 在拉取请求上评论
@sourcery-ai guide以随时(重新)生成审阅者指南。 - 解决所有 Sourcery 评论: 在拉取请求上评论
@sourcery-ai resolve以解决所有 Sourcery 评论。如果您已解决所有评论且不想再看到它们,这会很有用。 - 驳回所有 Sourcery 审阅: 在拉取请求上评论
@sourcery-ai dismiss以驳回所有现有 Sourcery 审阅。如果您想从头开始进行新审阅,这尤其有用——别忘了评论@sourcery-ai review来触发新审阅!
自定义您的体验
访问您的 仪表盘 以:
- 启用或禁用审阅功能,例如 Sourcery 生成的拉取请求摘要、审阅者指南等。
- 更改审阅语言。
- 添加、删除或编辑自定义审阅说明。
- 调整其他审阅设置。
获取帮助
Original review guide in English
Reviewer's guide (collapsed on small PRs)
Reviewer's Guide
Enhance GetMsg to include the group’s name when returning group messages by assigning the peerName to a new field and updating the message type definition.
Sequence diagram for GetMsg returning group_name in group messages
sequenceDiagram
participant GetMsg
participant Message
participant Response
GetMsg->>Message: Fetch message
Message-->>GetMsg: Return message object
GetMsg->>Response: Set group_name = peerName (if message_type is 'group')
Response-->>GetMsg: Return message with group_name
Class diagram for updated OB11Message structure
classDiagram
class OB11Message {
real_id?: number
user_id: number
group_id?: number
group_name?: string
message_type: 'private' | 'group'
sub_type?: 'friend' | 'group' | 'normal'
sender: OB11Sender
}
class OB11Sender
OB11Message --> OB11Sender
File-Level Changes
| Change | Details | Files |
|---|---|---|
| Add group_name field to group messages returned by GetMsg |
|
src/onebot11/entities.tssrc/onebot11/types.ts |
Possibly linked issues
- #0: The PR adds the group_name field to group messages, directly addressing the issue's request.
Tips and commands
Interacting with Sourcery
- Trigger a new review: Comment
@sourcery-ai reviewon the pull request. - Continue discussions: Reply directly to Sourcery's review comments.
- Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with@sourcery-ai issueto create an issue from it. - Generate a pull request title: Write
@sourcery-aianywhere in the pull
request title to generate a title at any time. You can also comment
@sourcery-ai titleon the pull request to (re-)generate the title at any time. - Generate a pull request summary: Write
@sourcery-ai summaryanywhere in
the pull request body to generate a PR summary at any time exactly where you
want it. You can also comment@sourcery-ai summaryon the pull request to
(re-)generate the summary at any time. - Generate reviewer's guide: Comment
@sourcery-ai guideon the pull
request to (re-)generate the reviewer's guide at any time. - Resolve all Sourcery comments: Comment
@sourcery-ai resolveon the
pull request to resolve all Sourcery comments. Useful if you've already
addressed all the comments and don't want to see them anymore. - Dismiss all Sourcery reviews: Comment
@sourcery-ai dismisson the pull
request to dismiss all existing Sourcery reviews. Especially useful if you
want to start fresh with a new review - don't forget to comment
@sourcery-ai reviewto trigger a new review!
Customizing Your Experience
Access your dashboard to:
- Enable or disable review features such as the Sourcery-generated pull request
summary, the reviewer's guide, and others. - Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.
Contributor
There was a problem hiding this comment.
你好 - 我已经审查了你的更改,它们看起来很棒!
帮助我更有用!请在每条评论上点击 👍 或 👎,我将利用这些反馈改进你的评论。
Original comment in English
Hey there - I've reviewed your changes and they look great!
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GetMsg返回群消息时没有返回群名,本修改增加了此信息的返回。
方便做日志记录,展示信息…
Sourcery 总结
错误修复:
Original summary in English
Summary by Sourcery
Bug Fixes: