-
Notifications
You must be signed in to change notification settings - Fork 8
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: add send for room by adding talkable trait #24
Conversation
fix payload parse painc fix filter structs not impl default trait
@7sDream Thanks a lot for your contribution! |
The data type of the heartbeat message may have been changed since there have been several months since I last worked on this project. |
Have you checked the message sending/receiving functions? Did they work? |
Just tested the Since my own bot didn't need receive message , I haven't tested it either. But I don’t think I changed any code for receiving messages. |
Link to wechaty/PMC#16 |
@huan What is the exact type of the |
Just added a example log screenshot for Heartbeat event data filed type is object. |
If you are referring to the Please see the proto buffer definition at https://github.com/wechaty/grpc/blob/9c4d6c91540db9fafc74b9bc1b5fc616beaa4526/proto/wechaty/puppet/event.proto#L36 |
According to the gRPC which is based on proto buffer protocol, the payload can only be string type. It might be a stringified objects json string. However, I do not know if there's any additional operations in the rust code. Please check it and let me know if there's anything I can help. |
When parse(deserialize) In many condition, The spec of this |
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.
LGTM
Yes, that's correct.
I don't think we have a spec for this I believe the P.S. I agree that the |
Thank you very much for your contribution! You are welcome to join Wechaty Contributor Program1. Join Wechaty Organization
I have invited you to join our Wechaty GitHub Organization, please accept it by following the above message. 2. Update Your Wechaty Contributor Profile
3. Join The Contributor Only WeChat RoomWe also have a WeChat room for contributors only which can discuss Wechaty at a deeper level, you are welcome to join and if you are interested. Please add @lijiarui wechat: ruirui_0914 and send her this pr link. She will invite you into Wechaty Contributor Room Cheers! |
Thanks a lot for such a detailed guide text. PR for create contributor profile: https://github.com/wechaty/wechaty.js.org/pull/961 |
通过增加一个
Talkable
trait 给Room
增加了send_xxx
系列方法,复用的Contract
里的实现。因为不知道 wechaty 的具体架构和协议,不太确定有没有问题,测试了
room.send_text
是没问题的。另外不知道是客户端这边实现确实不对,还是
wechaty-puppet-wechat
实现有问题,用wechaty
docker 镜像 0.63 版本作为 puppet,扫码登录时会发一个Heartbeat
类型的消息过来,但是data
字段是个Object
(而不是代码里定义的String
),会导致 panic,这里顺便修复了下。还有点小修改,比如给
QueryFilter
类型都加上了Default
trait 方便构造 filter。以下是
Heartbeat
的data
为Object
的 Log: