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

feat: 🎸 messageSendTextV2 #216

Closed
wants to merge 1 commit into from
Closed

Conversation

hcfw007
Copy link
Member

@hcfw007 hcfw007 commented May 8, 2023

因为 chatie 的 eslint 有修改,会导致每个PR test都无法通过。为了避免重复修改lint,这个等没有别的意见了再改吧。

wechaty/wechaty#2394

@hcfw007 hcfw007 requested a review from a team as a code owner May 8, 2023 09:22
@huan
Copy link
Member

huan commented Jun 14, 2023

A better practice would be sending a PR to fix the linting first, and we can merge that PR very easily so that other PRs will not have to care about the linting again.

@@ -75,6 +75,7 @@ const messageMixin = <MinxinBase extends typeof PuppetSkeleton & CacheMixin>(bas
abstract messageSendMiniProgram (conversationId: string, miniProgramPayload: MiniProgramPayload) : Promise<void | string>
abstract messageSendPost (conversationId: string, postPayload: PostPayload) : Promise<void | string>
abstract messageSendText (conversationId: string, text: string, mentionIdList?: string[]) : Promise<void | string>
abstract messageSendTextV2 (conversationId: string, text: string | string[], mentionIdList?: string[]) : Promise<void | string>
Copy link
Member

@huan huan Jun 14, 2023

Choose a reason for hiding this comment

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

I think we can just upgrade the messageSendText instead of adding a new V2; here are the reasons:

  1. the old Wechaty will always use the old Puppet
  2. the new Wechaty will use the new Puppet
  3. the new Wechaty will never use the old Puppet

So it seems that there's no chance that a Wechaty user will use string[] to call the old messageSendText function?

Copy link
Member Author

Choose a reason for hiding this comment

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

OK. I'll create a new PR when wechaty 2.0 branch is created.

Copy link
Member

Choose a reason for hiding this comment

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

May I know whether you agree with my comment or not?

Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

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

Totally. Unlike grpc and service, wechaty and puppet will never be mismatched.

Copy link
Member

Choose a reason for hiding this comment

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

Good to know! Cheers!

@hcfw007 hcfw007 closed this Jun 14, 2023
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.

None yet

2 participants