-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Pass mention list down to puppet and use mentionIdList from puppet if possible #1662
Conversation
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.
Thanks for the improvement!
I have some minor questions for you need to be fixed, and please feel free to let me know if you have any questions.
Updated |
I'll merge this PR after the CI turns green. |
I've fixed 4 ci jobs, the 2 remain failed. Travis CIThe Travic CI build failed in the process of running 02:14:56 INFO PuppetManager install(wechaty-puppet-puppeteer@^0.14.1) done
02:15:27 ERR PuppetPuppeteerBridge start() exception: TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded
02:15:27 ERR PuppetPuppeteer initBridge() exception: TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded
02:15:27 WARN PuppetPuppeteerBridge stop() page.close() exception: Error: Protocol error: Connection closed. Most likely the page has been closed.
02:15:27 ERR PuppetPuppeteer start() exception: Error: Error: TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded
Error: Error: Error: TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded
at PuppetPuppeteer.puppet.on.error (/tmp/npm-pack-testing.6486/node_modules/wechaty/dist/src/wechaty.js:437:44)
at PuppetPuppeteer.emit (events.js:182:13)
at PuppetPuppeteer.EventEmitter.emit (domain.js:442:20)
at PuppetPuppeteer.emit (/tmp/npm-pack-testing.6486/node_modules/wechaty-puppet/dist/src/puppet.js:165:22)
at PuppetPuppeteer.<anonymous> (/tmp/npm-pack-testing.6486/node_modules/wechaty/node_modules/wechaty-puppet-puppeteer/dist/src/puppet-puppeteer.js:106:22)
at Generator.throw (<anonymous>)
at rejected (/tmp/npm-pack-testing.6486/node_modules/wechaty/node_modules/wechaty-puppet-puppeteer/dist/src/puppet-puppeteer.js:23:65)
02:15:27 ERR Wechaty start() exception: Error: Error: TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded
Error: Error: Error: TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded
at PuppetPuppeteer.puppet.on.error (/tmp/npm-pack-testing.6486/node_modules/wechaty/dist/src/wechaty.js:437:44)
at PuppetPuppeteer.emit (events.js:182:13)
at PuppetPuppeteer.EventEmitter.emit (domain.js:442:20)
at PuppetPuppeteer.emit (/tmp/npm-pack-testing.6486/node_modules/wechaty-puppet/dist/src/puppet.js:165:22)
at PuppetPuppeteer.<anonymous> (/tmp/npm-pack-testing.6486/node_modules/wechaty/node_modules/wechaty-puppet-puppeteer/dist/src/puppet-puppeteer.js:106:22)
at Generator.throw (<anonymous>)
at rejected (/tmp/npm-pack-testing.6486/node_modules/wechaty/node_modules/wechaty-puppet-puppeteer/dist/src/puppet-puppeteer.js:23:65)
02:15:27 INFO Wechaty <wechaty-puppet-mock> stop() v0.23.22 is stoping ...
02:15:27 INFO Wechaty <wechaty-puppet-wechat4u> stop() v0.23.22 is stoping ...
02:15:27 INFO Wechaty <wechaty-puppet-puppeteer> stop() v0.23.22 is stoping ...
02:15:27 WARN PuppetPuppeteerBridge stop() page.close() exception: Error: Protocol error: Connection closed. Most likely the page has been closed. Since the error is related to code climateIt complains about:
Seems like this issue needs a refactor work on the |
Ok, please file another issue to track CodeClimate. And could you please push another commit to see if the Travis CI could pass? Because the puppeteer puppet sometimes will timeout for no reason. |
Sure, will create another issue for the CodeClimate issue.
No, Travis CI won't pass, I tried to restart the Travis CI job manually, but failed again with same error. |
If it does not work by restarting Travis ci manually, then push another commit might be helpful. |
Got it, will do. |
Code Climate issue created: #1663 |
About the Cognitive Complexity, we can learn from here: https://docs.codeclimate.com/docs/cognitive-complexity |
While reviewing another PR, I noticed that I forgot to modify the code in Please DO NOT merge this PR yet. |
Yes, there's something caused the confusion. After having a look into the code, I believe there should not be many places to support the Then I'd like to do the following change: class Message {
// ...
public async say ( public async say (
textOrContactOrFileOrUrl : string | Contact | FileBox | UrlLink, textOrContactOrFileOrUrl : string | Contact | FileBox | UrlLink,
- mention? : Contact | Contact[], mention? : Contact | Contact[],
): Promise<void> { Remove the |
Well, I think I am actually agree with you, but just think further of this situation. When I use
We should remove the |
It's wired: why do I have to mention someone when I say something in a room? |
If you call the Imagine that multiple people discuss something in a room, and only someone attracts your attention, and you only want to reply to that message. |
I will assume that if you want to say something in a room, you will use |
No, reply is not the case.
the Just say it is enough. ORHow about let's get rid of the Another reason to do this is: it's obvious that a message will not be able to say . (we can say to contact, or say in room, but how can we say XXX message?) |
Yep, if that's the definition of We can remove it, or rename it as |
It will be a breaking change, so please just remove the And let's talk about it later, because it's not a big deal. |
Removed |
Thanks for the great contribution! |
Glad to see |
Just a small reminder, Besides, @xinbenlv is eager to have that feature in |
Refer to issue: #1560