-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Redesign notice handling and introduce NoticeProcessorPipeline
#1369
Conversation
mirai-core/src/commonMain/kotlin/utils/io/serialization/utils.kt
Outdated
Show resolved
Hide resolved
final override val asStranger: StrangerImpl by lazy { | ||
Mirai.newStranger(this, StrangerInfoImpl(bot.id, bot.nick)).cast() | ||
} | ||
final override var nick: String by asFriend.info::nick |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nick
在登录完成后会进行最后一次初始化校检, 使用的是 try-catch
, 现在不是 lateinit var
了会导致最后的初始化校检不执行
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
实际上 nick 应该不存在这种问题了 传过来的 tlv 会告诉你 nick,不过还是加上比较好
2b221b7
to
4e95154
Compare
This comment has been minimized.
This comment has been minimized.
329d7ec
to
6e2d575
Compare
…nd` and `IMirai.newStranger`
Do not broadcast StrangerAddedEvent if added twice, fix stranger scope not closed Do not add new instance if there is already one Close and remove corresponding stranger instance if there is new friend.
Co-authored-by: Karlatemp <[email protected]>
- Extract `SyncController`; - Add super type `ProtocolStruct` to `ProtoBuf` and `JceStruct` to standardize `NoticeProcessorPipeline.process` - and other implementations for pipeline
e4a9440
to
65d6a08
Compare
- GroupRetrieveTest - GroupTransferTest - MemberAdminChangeTest - MemberQuitTest - MuteTest
65d6a08
to
70f2b04
Compare
mirai-core/src/commonMain/kotlin/network/notice/priv/FriendNoticeProcessor.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: Karlatemp <[email protected]>
327f812
to
2cc101e
Compare
dump trashPacketFactory
处理同步与解析等逻辑, 将结果提交给NoticeProcessorPipeline
GroupListNoticeProcessor