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

merge

......@@ -409,6 +409,14 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
[![Wechaty Sponsor](https://opencollective.com/wechaty/sponsor.svg?width=890)](https://opencollective.com/wechaty/#sponsor)
## Multi-language Wechaty
- [Wechaty](https://github.com/wechaty/wechaty) - Conversatioanl AI Chatot SDK for Wechaty Individual Accounts (TypeScript)
- [Python Wechaty](https://github.com/wechaty/python-wechaty) - Python WeChaty Conversational AI Chatbot SDK for Wechat Individual Accounts (Python)
- [Go Wechaty](https://github.com/wechaty/go-wechaty) - Go WeChaty Conversational AI Chatbot SDK for Wechat Individual Accounts (Go)
- [Java Wechaty](https://github.com/wechaty/java-wechaty) - Java WeChaty Conversational AI Chatbot SDK for Wechat Individual Accounts (Java)
- [Scala Wechaty](https://github.com/wechaty/scala-wechaty) - Scala WeChaty Conversational AI Chatbot SDK for WechatyIndividual Accounts (Scala)
## Author
1. [Huan](https://github.com/huan) [(李卓桓)](http://linkedin.com/in/zixia), Tencent TVP of Chatbot
......
{
"name": "wechaty",
"version": "0.40.3",
"version": "0.40.4",
"description": "Wechaty is a Bot SDK for Individual Account, Powered by TypeScript, Docker, and 💖",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
......@@ -134,7 +134,7 @@
"sloc": "^0.2.1",
"tstest": "^0.4.10",
"typedoc": "^0.16.11",
"wechaty-puppet-mock": "^0.21.2"
"wechaty-puppet-mock": "^0.22.2"
},
"files_comment__whitelist_npm_publish": "http://stackoverflow.com/a/8617868/1123955",
"files": [
......
......@@ -34,7 +34,7 @@ export const PUPPET_DEPENDENCIES = {
* Wechaty Internal Puppets: dependence by package.json
*/
'wechaty-puppet-hostie' : '^0.8.3', // https://www.npmjs.com/package/wechaty-puppet-hostie
'wechaty-puppet-mock' : '^0.21.2', // https://www.npmjs.com/package/wechaty-puppet-mock
'wechaty-puppet-mock' : '^0.22.3', // https://www.npmjs.com/package/wechaty-puppet-mock
/**
* Wechaty External Puppets
......
......@@ -670,13 +670,13 @@ export class Message extends Accessory implements Sayable {
* Use mention list if mention list is available
* otherwise, process the message and get the mention list
*/
if (this.payload && this.payload.mentionIdList) {
if (this.payload && 'mentionIdList' in this.payload) {
const idToContact = async (id: string) => {
const contact = this.wechaty.Contact.load(id)
await contact.ready()
return contact
}
return Promise.all(this.payload.mentionIdList.map(idToContact))
return Promise.all(this.payload.mentionIdList?.map(idToContact) ?? [])
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册