Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_wxContact(userId) {
return wechaty.Contact.find({
alias: '#' + userId,
}).then((contact) => {
if (contact) {
return contact;
}
if (this._buffers.contact[userId]) {
// data in the buffer may be out of date
return this._buffers.contact[userId];
}
return new errors.TelegramError('contact not found');
});
}