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

新接口 CqNoticeEssencePostContext.GroupId和一些其他的东西 #52

Merged
merged 4 commits into from
Mar 31, 2024

Conversation

gdr2333
Copy link
Contributor

@gdr2333 gdr2333 commented Mar 29, 2024

新的接口:
EleCho.GoCqHttpSdk.Post.Interface.IGroupPostContext:所有群聊上报消息(除了戳一戳)都实现了该接口,可以读取群号
EleCho.GoCqHttpSdk.ICqActionAndPostSession:正向和反向websocket会话实现了这个接口,其实就是ICqPostSession和ICqActionSession
成员变更:CqNoticeEssencePostContext现在实现了GroupId
行为变更:几乎所有上报消息的成员的set访问器都改为了internel set,因为你根本就不应该更改这些内容
其他:
将.net 8.0添加到目标框架
csproj文件的一些清理

EleCho.GoCqHttpSdk.Post.Interface.IGroupPostContext:所有群聊上报消息(除了戳一戳)都实现了该接口,可以读取群号
EleCho.GoCqHttpSdk.ICqActionAndPostSession:正向和反向websocket会话实现了这个接口,其实就是ICqPostSession和ICqActionSession
成员变更:CqNoticeEssencePostContext现在实现了GroupId
行为变更:几乎所有上报消息的成员的set访问器都改为了internel set,因为你根本就不应该更改这些内容
其他:
将.net 8.0添加到目标框架
csproj文件的一些清理
@gdr2333
Copy link
Contributor Author

gdr2333 commented Mar 29, 2024

啊,忘写了:
CqPrivateMessagePostContext和CqGroupMessagePostContext的Sender属性已转移到基类CqMessagePostContext

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个抽象没必要

Copy link
Member

@SlimeNull SlimeNull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 删去 IActionAndPostSession
  2. CqMessagePostContext 的 Sender 应该在当前类型的 ReadModel 中初始化

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我建议删掉这个抽象

@SlimeNull
Copy link
Member

另外, 既然已经有了 IGroupPostContext 接口抽象, 那么这个接口最好尽可能包含它应该有的东西, 然后最好添加一切其他的, 同等级的接口抽象, 例如私聊上报 IPrivatePostContext 这样的

…Context的sender初始化过程转移到CqMessagePostContext,并顺手改了一下错误的文件名
@SlimeNull SlimeNull merged commit 935a667 into OrgEleCho:master Mar 31, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants