From ff7c50286635c24fff5361c14bf5135fb4f4a935 Mon Sep 17 00:00:00 2001 From: kittydoor Date: Sun, 5 Feb 2023 01:25:04 +0100 Subject: [PATCH] socketmode example: use embedded api client in socketmode client --- examples/socketmode/socketmode.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/socketmode/socketmode.go b/examples/socketmode/socketmode.go index 6f1e65b48..1490a932b 100644 --- a/examples/socketmode/socketmode.go +++ b/examples/socketmode/socketmode.go @@ -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) } @@ -137,7 +137,8 @@ func main() { ), ), ), - }} + }, + } client.Ack(*evt.Request, payload) default: