-
Notifications
You must be signed in to change notification settings - Fork 680
Open
Labels
area:typescriptissues that specifically impact using the package from typescript projectsissues that specifically impact using the package from typescript projectsbugM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documentedM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documentedpkg:typesapplies to `@slack/types`applies to `@slack/types`semver:major
Milestone
Description
Description
The text property does not exist on MessageRepliedEvent interface in typescript
What type of issue is this? (place an x in one of the [ ])
- bug
- enhancement (feature request)
- question
- documentation related
- example code related
- testing related
- discussion
Requirements (place an x in each of the [ ])
- I've read and understood the Contributing guidelines and have done my best effort to follow them.
- I've read and agree to the Code of Conduct.
- I've searched for any related issues and avoided creating a duplicate issue.
Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
package version: 3.12.1
node version: 16.3.2
OS version(s): MacOS 12.4
Steps to reproduce:
slackApp.message(subtype("message_replied"), async ({ message }) => {
if (message.subtype === "message_replied") {
const messageThreadId = message.message.thread_ts;
// Find the socket for the given thread ID
for (const connection in openConnections) {
const connectionProps = openConnections[connection];
if (connectionProps.thread === messageThreadId) {
connectionProps.socket.send(message.message.text); <---
}
}
}
})Expected result:
message.message.text is type string per event documentation:
https://api.slack.com/events/message/message_replied
Actual result:
Property 'text' does not exist on type 'MessageEvent & { thread_ts: string; reply_count: number; replies: MessageEvent[]; }'.
Property 'text' does not exist on type 'MessageChangedEvent & { thread_ts: string; reply_count: number; replies: MessageEvent[]; }'
Attachments:
Metadata
Metadata
Assignees
Labels
area:typescriptissues that specifically impact using the package from typescript projectsissues that specifically impact using the package from typescript projectsbugM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documentedM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documentedpkg:typesapplies to `@slack/types`applies to `@slack/types`semver:major
