From adcb6deccf2d28d572b6ee52393e15aa55b24b97 Mon Sep 17 00:00:00 2001 From: lijiarui Date: Thu, 13 Jul 2017 12:06:28 +0800 Subject: [PATCH] room-join cannot detect inviteeList when people join in the room with qrcode (#651) * change reg * add test * remove undefine * add compatible --- src/puppet-web/firer.spec.ts | 10 ++++++++++ src/puppet-web/firer.ts | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/puppet-web/firer.spec.ts b/src/puppet-web/firer.spec.ts index 0eeadf93..223a6bcd 100644 --- a/src/puppet-web/firer.spec.ts +++ b/src/puppet-web/firer.spec.ts @@ -91,6 +91,11 @@ test('parseRoomJoin()', t => { `你`, ['桔小秘'], ], + [ + `" 桔小秘"通过扫描"李佳芮"分享的二维码加入群聊`, + `李佳芮`, + ['桔小秘'], + ], [ `"桔小秘"通过扫描"李佳芮"分享的二维码加入群聊`, `李佳芮`, @@ -101,6 +106,11 @@ test('parseRoomJoin()', t => { `your`, ['桔小秘'], ], + [ + `" 桔小秘" joined the group chat via the QR Code shared by "李佳芮".`, + `李佳芮`, + ['桔小秘'], + ], [ `"桔小秘" joined the group chat via the QR Code shared by "李佳芮".`, `李佳芮`, diff --git a/src/puppet-web/firer.ts b/src/puppet-web/firer.ts index e93637c7..9ec8f319 100644 --- a/src/puppet-web/firer.ts +++ b/src/puppet-web/firer.ts @@ -59,8 +59,10 @@ const regexConfig = { ], roomJoinQrcode: [ + /^" (.+)" joined the group chat via the QR Code shared by "?(.+?)".$/, /^"(.+)" joined the group chat via the QR Code shared by "?(.+?)".$/, /^"(.+)" joined the group chat via "?(.+?)"? shared QR Code.$/, + /^" (.+)"通过扫描"?(.+?)"?分享的二维码加入群聊$/, /^"(.+)"通过扫描"?(.+?)"?分享的二维码加入群聊$/, ], -- GitLab