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

feat: 能否支持用户回复消息消息带有引用消息的ID #4

Closed
foxdad opened this issue Oct 31, 2023 · 8 comments
Closed

feat: 能否支持用户回复消息消息带有引用消息的ID #4

foxdad opened this issue Oct 31, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@foxdad
Copy link

foxdad commented Oct 31, 2023

警告: 在进一步操作之前,请检查下列选项。如果您忽视此模板或者没有提供关键信息,您的 Issue 将直接被关闭

  • 确保您使用的是 最新开发版本 的 Shamrock.
  • 确保您的功能请求尚未在 Issues 列表中提出.
  • 确保您的功能请求是与 Shamrock 相关的,且可以实现.

描述功能

现在的sk每次在群聊中引用消息回复,返回的是本次消息的id而不能查询到引用消息的消息ID,
能实现这个功能就好了,

这个地方与gocq稍微有点差别

撤回消息也是,使用消息撤回,会提示,消息message_id 没有映射

实现方法

请提供您认为可以实现此功能的方法,如果您不知道如何实现,可以留空。
当然,如果您有兴趣,也可以自己实现并向我们提交 Pull Request。

@foxdad foxdad added the enhancement New feature or request label Oct 31, 2023
@whitechi73
Copy link
Owner

举个例子

@whitechi73
Copy link
Owner

テスト(测试):

  • 发送消息ID为0的消息A
  • 发送回复消息A的消息B(reply元素中的id指向消息A)
  • 发送回复消息A的消息C(reply元素中的id指向消息A)

无法复现你的问题。

@fuqiuluo
Copy link
Collaborator

发送消息然后其返回的MessageId不可靠是吗?

@fuqiuluo
Copy link
Collaborator

发送消息然后其返回的MessageId不可靠是吗?

是的,会对应不上,在撤回消息的时候也会有问题

sk的日志里面会出现,没有映射的警告

看了一下,QQ内部设计有问题,Bot发送了消息A(QQ内部接口说这条消息的seq是108),然而实际上这个seq=109,seq不可信导致映射关系有问题。

@fuqiuluo
Copy link
Collaborator

发送消息然后其返回的MessageId不可靠是吗?

是的,会对应不上,在撤回消息的时候也会有问题
sk的日志里面会出现,没有映射的警告

看了一下,QQ内部设计有问题,Bot发送了消息A(QQ内部接口说这条消息的seq是108),然而实际上这个seq=109,seq不可信导致映射关系有问题。

因为这个问题是qq内的问题,回复消息id问题还能解决吗,这个qq层面sk因为干涉不到了吧,感觉这个问题点解决有点悬

应该可以解决,白池还没有下课 下课了我去找她。

@fuqiuluo
Copy link
Collaborator

测试结果如下:
来自接口onAddSendMsg所提供的msgSeq并不可靠,其数据无法用于构建映射关系。

需要onAddSendMsg触发后,使用其msgId调用接口getMsgByMsgId获取正确的消息,其中如果消息发送返回包未成功_返回/获取/解析_,仍旧无法获取正确的msgSeq,需要实现一个字段保存某个确切msgId的消息是否已经成功发送了。

@Simplxss
Copy link
Collaborator

Simplxss commented Nov 1, 2023

测试结果如下: 来自接口onAddSendMsg所提供的msgSeq并不可靠,其数据无法用于构建映射关系。

需要onAddSendMsg触发后,使用其msgId调用接口getMsgByMsgId获取正确的消息,其中如果消息发送返回包未成功_返回/获取/解析_,仍旧无法获取正确的msgSeq,需要实现一个字段保存某个确切msgId的消息是否已经成功发送了。

我之前就提到过这个问题的 发消息返回的msgSeq似乎总是比实际少1 msgId和回复时给的不一致 没什么特别好的办法解决 回头看看其他协议的实现吧

@JUST-HK416D
Copy link

一样遇到该问题,发送消息后响应的message_id和实际的id不一致

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants