Skip to content

Commit

Permalink
Merge pull request slack-go#1164 from kittydoor/socketmode-example
Browse files Browse the repository at this point in the history
socketmode example: use embedded api client in socketmode client
  • Loading branch information
kanata2 authored Apr 15, 2023
2 parents f2673af + ff7c502 commit c4095cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/socketmode/socketmode.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func main() {
innerEvent := eventsAPIEvent.InnerEvent
switch ev := innerEvent.Data.(type) {
case *slackevents.AppMentionEvent:
_, _, err := api.PostMessage(ev.Channel, slack.MsgOptionText("Yes, hello.", false))
_, _, err := client.PostMessage(ev.Channel, slack.MsgOptionText("Yes, hello.", false))
if err != nil {
fmt.Printf("failed posting message: %v", err)
}
Expand Down Expand Up @@ -137,7 +137,8 @@ func main() {
),
),
),
}}
},
}

client.Ack(*evt.Request, payload)
default:
Expand Down

0 comments on commit c4095cb

Please sign in to comment.