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

room-join cannot detect inviteeList when people join in the room with qrcode #651

Merged
merged 4 commits into from
Jul 13, 2017

Conversation

lijiarui
Copy link
Member

@lijiarui lijiarui commented Jul 12, 2017

#248
room-join cannot detect inviteeList when people join in the room with QR code:

  • If one contact joins in the room by the QR code shared by the bot, system message as follows:

    • "李佳芮" joined the group chat via your shared QR Code.
    • "李佳芮"通过扫描你分享的二维码加入群聊
  • If one contact joins in the room isn't by the QRcode shared by the bot, system message as follows:

    • " 李佳芮" joined the group chat via your shared QR Code.
    • " 李佳芮"通过扫描你分享的二维码加入群聊
      (Pay attention that it has more space before 李佳芮)

Copy link
Member

@huan huan left a comment

Choose a reason for hiding this comment

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

Please explain your changes.

@@ -59,9 +59,10 @@ const regexConfig = {
],

roomJoinQrcode: [
/^"(.+)" joined the group chat via the QR Code shared by "?(.+?)".$/,
/^"(.+)" joined the group chat via "?(.+?)"? shared QR Code.$/,
Copy link
Member

Choose a reason for hiding this comment

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

Why you get rid of "?(.+?)"?, and use undefined in your code, please explain.

I don't think this change is needed, and also I believe it's not a good choice to do this.

@@ -194,7 +195,9 @@ async function checkRoomJoin(m: Message): Promise<void> {
let inviteeContactList: Contact[] = []

try {
if (inviter === "You've" || inviter === '你' || inviter === 'your') {
Copy link
Member

Choose a reason for hiding this comment

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

I'd like to keep this line of code, instead of your new !inviter.

Because I think to check more words in the message is a good way to make sure you are tracing the right message in Wechat.

@coveralls
Copy link

coveralls commented Jul 13, 2017

Coverage Status

Coverage remained the same at 54.647% when pulling d914328 on lijiarui:qrcodeBug into 1830cb3 on Chatie:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 54.647% when pulling d914328 on lijiarui:qrcodeBug into 1830cb3 on Chatie:master.

@huan huan merged commit adcb6de into wechaty:master Jul 13, 2017
@huan
Copy link
Member

huan commented Jul 13, 2017

Thanks

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.

3 participants