-
Notifications
You must be signed in to change notification settings - Fork 240
we need to shield wechaty_puppet"s **QueryFilter to user in wechaty #27
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
Conversation
The topic is about building query wrappers for wechaty_puppet **QueryFilter class. They all use QueryFilter from wechaty_puppt. |
If I understand you right, you are talking about there's an interface named I think to remove it would be a good idea after reading the code you mentioned, so I made a breaking change to the Wechaty at https://github.com/wechaty/wechaty/pull/1931/files Please let me know this is what you want, or feel free to correct me if I understand wrong. Thank you very much. |
I think MessageQueryFilter interface can't be removed. I think we should not use If we create a interface MessageQueryFilter in python-wechaty, developer only need to known python-wechaty.
|
I understand your concern. It's very similar to wechaty/wechaty#1914: we have some problems with the NPM packages like this one:
In this case, I believe there's a very easy solution as well: We can re-export the Please feel free to let me know what you think about it, thanks. |
Your solution is great. |
Yes, it is. Glad to know you like this solution! |
So let's start discussing my PR wechaty/wechaty#1931 Do you agree that we should remove the Please feel free to let me know what you think, thank you very much. |
I agree. |
Great! Cloud you help me to approve that PR in Wechaty repository? Because that would help us remember this discussion together. I'll merge that PR after you approved it. Link to: wechaty/wechaty#1929 |
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
Let's merge this PR first. |
Problem: When developer use wechaty to query room/contact/friendship, they will use **QueryFilter from wechaty_puppet, so they should import wechaty_puppet too.
There is only one module that build a wrapper to QueryFilter class in ts wechaty . It's Message module that use MessageUserQueryFilter, so developer don't known wechaty_puppet MessageQueryFilter.
But I think MessageUserFilter is ugly. MessageQueryFilter is great and can be use in wechaty also.
Solution: Below is my simple code design.