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

get rid of unnecessary `ready()` call

上级 7bf7986b
......@@ -81,7 +81,6 @@ async function main() {
const MAX = 17
for (let i = 0; i < contactList.length; i++ ) {
const contact = contactList[i]
await contact.ready()
if (!contact.weixin()) {
await contact.refresh()
......
......@@ -66,7 +66,6 @@ bot
m.set('to', 'filehelper')
try {
await contact.ready()
logMsg = 'received `friend` event from ' + contact.get('name')
m.set('content', logMsg)
bot.send(m)
......
......@@ -16,11 +16,6 @@ export async function onMessage(message: Message): Promise<void> {
const sender = message.from()
const content = message.content()
if (room) {
await room.ready()
}
await sender.ready()
console.log((room ? '[' + room.topic() + ']' : '')
+ '<' + sender.name() + '>'
+ ':' + message.toStringDigest()
......
......@@ -369,7 +369,6 @@ async function createDingRoom(contact): Promise<any> {
return
}
await helperContact.ready()
log.info('Bot', 'getHelperContact() ok. got: %s', helperContact.name())
const contactList = [contact, helperContact]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册