Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加 get_message 动作 #166

Open
abrahum opened this issue Apr 29, 2022 · 3 comments
Open

添加 get_message 动作 #166

abrahum opened this issue Apr 29, 2022 · 3 comments
Labels
A-message Area: 消息接口 C-rfc Category: 改进提案 ST-draft Status: 草稿

Comments

@abrahum
Copy link
Collaborator

abrahum commented Apr 29, 2022

摘要

添加消息动作 get_message 接受 message_id: String 参数,若存在返回对应的 MessageEvent

动机

缺少该动作将无法根据 MessageSegment 中的 reply 回复中的 message_id 获得对应 MessageEvent

具体描述

请求参数:

字段名 数据类型 说明
message_id string 消息 ID

响应数据:同 MessageEvent

局限

替代方案

@abrahum abrahum added the C-rfc Category: 改进提案 label Apr 29, 2022
abrahum added a commit to abrahum/onebot that referenced this issue Apr 29, 2022
@stdrc stdrc added A-message Area: 消息接口 ST-draft Status: 草稿 labels Apr 29, 2022
@stdrc
Copy link
Member

stdrc commented Jun 10, 2022

感觉是不是只返回 message 字段比较好,event 里面感觉有很多无关的东西

@stdrc
Copy link
Member

stdrc commented Jun 10, 2022

PR #167 里面有点问题,响应数据感觉应该类似这样:

{
    "status": "ok",
    "retcode": 0,
    "data": {
        "message": [...],
        "alt_message": "我是大笨蛋"
    },
    "message": ""
}

另外,除了 messagealt_message 之外还有必要的字段吗?

@abrahum abrahum closed this as completed Jul 1, 2022
@stdrc stdrc reopened this Jul 1, 2022
@stdrc stdrc changed the title 添加 get_message 动作 添加 get_message 动作 Aug 16, 2022
@stdrc
Copy link
Member

stdrc commented Aug 16, 2022

感觉还是有点想不清楚这接口应该返回什么,怎么都不太优雅,要不 ob12 还是先不加入标准,issue 还是先开着,之后看看能不能有新的设计

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-message Area: 消息接口 C-rfc Category: 改进提案 ST-draft Status: 草稿
Projects
None yet
Development

No branches or pull requests

2 participants