-
Notifications
You must be signed in to change notification settings - Fork 22
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
grpc MessageType doesn't match with that in ts-wechaty #65
Comments
This leads to this problem in all multi-languages wechaty, not just in python-wechaty. |
Short answer:
Long answer posted later shortly. |
Long answer: The The situation will be changed when we are not working under the TypeScript environments:
The GRPC ServiceAll the GRPC Service is based on the Protocol Buffer definition file, this file will define everything about the Puppet API and all the constraints (like When we are working with the GRPC service, we must map everything that we have from local to the Protocol Buffer defined values. And as we discussed before, for a higher perspective of the Wechaty ecosystem, we will treat the Protocol Buffer values as the true Golden Source of Truth. (above all languages, including TS)
The Multi-lang WechatyMulti-lang Wechaty means Python, Java, and Go (Non-TS) Wechaty. When Multi-lang Wechaty is working with the GRPC Service, we should convert all values from the GRPC service to the local value, so that we can make sure everything is right. As we discussed before, the best way to use those values for our Multi-lang Wechaty is that we do not define locally. Instead of locally define them, we use all defined values from the GRPC Stub file because they can be auto-generated from the Protocol Buffer, which will be always synced with our Golden Source of Truth: Protocol Buffer. Summary
Convert everything from local to GRPC, then from GRPC to local. You can think what we are doing is as same as the socket API functions: |
Yes, The reason why I create this issu is that hostie-server follow And completing the |
Thanks for such a insightful analytics. I'll review the related code in details later. |
I am testing .net with For server response, it will return 9 for mini program, and the In addition, sometimes it will return 0 for miniprogram. I am test with |
https://github.com/Chatie/grpc/blob/4c32075f391c29407a9ace0fb6c8765097277bb1/proto/wechaty/puppet/message.proto#L9-L26
This does not match the
MessageType
definition in wechaty-puppet, and we found this during testing. Tests show that wechaty-puppet's data type definition is correct.The text was updated successfully, but these errors were encountered: