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

code clean

上级 4ad3329c
......@@ -85,13 +85,17 @@ bot
})
})
.on('message', async msg => {
if (msg.type() !== bot.Message.Type.Text) {
return
}
try {
console.log(msg.toString()) // on(message) exception: Error: no file
const text = msg.text()
const from = msg.from()
const nameList: string[] = []
console.log('msg text:', text.substr(0, 20))
// console.log('msg text:', text.substr(0, 20))
// Room.findAll()
if (/^testRoom$/.test(text)) {
......
......@@ -413,7 +413,7 @@ export class Bridge extends EventEmitter {
let cont = true
while (cont && this.state.on() && this.selfId) {
log.silly('PuppetPadchatBridge', `syncContactsAndRooms() while()`)
log.silly('PuppetPadchatBridge', `syncContactsAndRooms() while() syncing WXSyncContact ...`)
const syncContactList = await this.padchatRpc.WXSyncContact()
......@@ -474,7 +474,6 @@ export class Bridge extends EventEmitter {
)
}
}
// log.silly('PuppetPadchatBridge', `syncContactsAndRooms(), continue to load via WXSyncContact ...`)
}
// contactIdList = contactIdList.filter(id => !!id)
......
......@@ -527,7 +527,8 @@ export class PadchatRpc extends EventEmitter {
throw Error('PadchatRpc, WXGetChatRoomMember, cannot get result from websocket server!')
}
log.silly('PadchatRpc', 'WXGetChatRoomMember() result: %s', JSON.stringify(result))
log.silly('PadchatRpc', 'WXGetChatRoomMember() result: %s', JSON.stringify(result).substr(0, 500))
// console.log(result)
// 00:40:44 SILL PadchatRpc WXGetChatRoomMember() result: {"chatroom_id":0,"count":0,"member":"null\n","message":"","status":0,"user_name":""}
if (!result.user_name || !result.member) {
......
......@@ -129,6 +129,7 @@ export class Room extends Accessory implements Sayable {
} catch (e) {
log.verbose('Room', 'findAll() rejected: %s', e.message)
console.error(e)
Raven.captureException(e)
return [] as Room[] // fail safe
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册