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

支持KookQuote的获取和MessageReference的解析 #161

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

ForliyScarlet
Copy link
Member

@ForliyScarlet ForliyScarlet commented Aug 6, 2024

  • 支持通过 KookMessageContent.reference() 获取 KookQuote
  • 支持直接使用 MessageReference 指定一个消息引用(也包括 KookQuote

resolve #156

see also simple-robot/simpler-robot#898

顺便发现了几个KOOK服务端的 * 问题:

attrchements

  • 文字子频道消息似乎收到的 attrchements 永远为 null 进而无法判断它到底是什么结构的,虽然文档上说是个 object 结构。
  • 而私聊会话中,attrchemenets 在没有任何多媒体消息的情况下给的是空数组结构 [],与文档描述相悖。

quote

私聊会话中,一个消息如果不包括引用,则查询details中 quote 字符响应的竟然是个空字符串:

{"quote":""}

而实际包含引用的情况下,返回的又是普通的 Quote 结构体:

{"quote":{"id":"..."}}

...

...

我服了。

@ForliyScarlet
Copy link
Member Author

Qodana Community for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@ForteScarlet ForteScarlet merged commit c25292a into dev/main Aug 6, 2024
4 checks passed
@ForteScarlet ForteScarlet deleted the dev/support-quote-msg-element branch August 7, 2024 08:12
@ForteScarlet ForteScarlet linked an issue Aug 7, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
特性 功能特性
Projects
None yet
Development

Successfully merging this pull request may close these issues.

实现 quote 的相关内容(消息元素) 标准的“消息引用”定义
2 participants