We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Definition
type MessagePayload = (MessagePayloadBase & MessagePayloadRoom) | (MessagePayloadBase & MessagePayloadTo)
const payload = messageRawPayloadParser(): MessagePayload
If we want to get mentionIdList of payload, we have to claim that:
mentionIdList
payload
(payload as (MessagePayloadBase & MessagePayloadRoom)).mentionIdList
But MessagePayloadBase and MessagePayloadRoom are not export in wechaty-puppet, so any good idea about this issue?
MessagePayloadBase
MessagePayloadRoom
wechaty-puppet
The text was updated successfully, but these errors were encountered:
Resolved by this way:
payload && 'mentionIdList' in payload
copy from:
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) ?? []) }
Sorry, something went wrong.
No branches or pull requests
Definition
If we want to get
mentionIdList
ofpayload
, we have to claim that:But
MessagePayloadBase
andMessagePayloadRoom
are not export inwechaty-puppet
, so any good idea about this issue?The text was updated successfully, but these errors were encountered: