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

重写消息协议层与发送消息流程 #1997

Merged
merged 56 commits into from
May 25, 2022
Merged

重写消息协议层与发送消息流程 #1997

merged 56 commits into from
May 25, 2022

Conversation

Him188
Copy link
Member

@Him188 Him188 commented Apr 28, 2022

重写 MessageChain,优化性能。
重写消息解析和编码,重写收发消息流程。
允许模块化,可扩展,易于测试。为将来支持频道等做准备。

测试进度:

  • PlainText/At/AtAll
  • Image from macOS (mac 官方客户端发送给Bot的图片后缀均为 .mirai #1111)
  • Image from Android
  • Image from iOS
  • Image from iPadOS
  • Image from Windows
  • FlashImage
  • Face
  • MarketFace
  • Dice from Android
  • Dice from Windows (看起来现在 Windows 已经不支持了)
  • MusicShare
  • PokeMessage
  • PttMessage (已弃用, 不测试)
  • RichMessage
  • VipFace
  • FileMessage
  • CustomMessage

特别测试:

TODO:

  • ensureSequenceIdAvailable 会让 test 延迟 3 秒

@Him188 Him188 added the s:core 子系统: mirai-core label Apr 28, 2022
@Him188 Him188 added this to the 2.12 milestone Apr 28, 2022
@Him188 Him188 force-pushed the send-message-rewrite branch 3 times, most recently from 3a4691c to 673ed3b Compare April 30, 2022 18:01
@Him188 Him188 modified the milestones: 2.12, 2.12.0-RC May 8, 2022
@Him188 Him188 changed the title Send message rewrite 重写消息协议层与发送消息流程 May 16, 2022
@Him188 Him188 linked an issue May 16, 2022 that may be closed by this pull request
@Him188 Him188 force-pushed the send-message-rewrite branch 6 times, most recently from 7027949 to 60f309b Compare May 23, 2022 21:26
@Him188 Him188 marked this pull request as ready for review May 23, 2022 21:27
@Him188 Him188 force-pushed the send-message-rewrite branch 3 times, most recently from 6d0e86d to 88acc59 Compare May 23, 2022 22:35
@Him188 Him188 added the z:ready-to-merge 状态: PR 已经可以合并, 正在等待一些安排 label May 25, 2022
@Him188 Him188 mentioned this pull request May 25, 2022
10 tasks
Him188 added 14 commits May 25, 2022 22:13
Change attributes carrying helper objects to components

Make ClockHolder open

Use originalMessage for MessageReceipt
Add fragmented test

Fix MusicShareProtocol and implement sending tests for MusicShareProtocolTest

OutgoingMessagePipelineImpl: set stopWhenConsumed

Fix `currentMessageChain` not updated in `processAlso`, add strong message packets checks, add tests for converting messages failed to send at FIRST step to LongMessageInternal

Add notes for receiving ForwardMessage

Add facade parameters to `download ForwardMessage*`

Add ForwardMessageProtocolTest

Add QuoteReplyProtocolTest

Add CONTAINING_MSG for MessageDecoderContext.attributes, for information-use only

Fix MessageReceiptTest

Fix QuoteReplyProtocolTest
@Him188 Him188 merged commit 297592b into dev May 25, 2022
@Him188 Him188 deleted the send-message-rewrite branch May 25, 2022 21:39
@Him188 Him188 added the x:deprecation 属性: API 弃用 label Jun 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s:core 子系统: mirai-core x:deprecation 属性: API 弃用 z:ready-to-merge 状态: PR 已经可以合并, 正在等待一些安排
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mac 官方客户端发送给Bot的图片后缀均为 .mirai
1 participant