提交 2546084f 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

bug fix

上级 ba445d8e
......@@ -422,7 +422,7 @@ function fireRoomJoin(m) {
const room = m.room()
const content = m.content()
const inviteRe = /^(.+) invited "(.+)" to the group chat$/
const inviteRe = /^"?(.+)"? invited "(.+)" to the group chat$/
const found = content.match(inviteRe)
if (!found) {
......@@ -435,10 +435,10 @@ function fireRoomJoin(m) {
if (inviter === "You've") {
inviterContact = Contact.load(this.userId)
} else {
inviterContact = m.member(inviter)
inviterContact = room.member(inviter)
}
inviteeContact = m.room().member(invitee)
inviteeContact = room.member(invitee)
if (!inviterContact || !inviteeContact) {
log.error('PuppetWebEvent', 'inivter or invitee not found for %s, %s', inviter, invitee)
......@@ -465,7 +465,7 @@ function fireRoomLeave(m) {
leaverContact = m.room().member(leaver)
if (!leaverContact) {
log.err('PuppetWebEvent', 'leaver not found for %s', leaver)
log.error('PuppetWebEvent', 'leaver not found for %s', leaver)
return
}
room.emit('leave', leaverContact)
......
......@@ -11,6 +11,7 @@
const EventEmitter = require('events')
const Wechaty = require('./wechaty')
const Contact = require('./contact')
const log = require('./brolog-env')
const UtilLib = require('./util-lib')
const Config = require('./config')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册