Skip to content

Commit

Permalink
fix: Fix example logging
Browse files Browse the repository at this point in the history
  • Loading branch information
raed-shomali committed Nov 7, 2023
1 parent 08aa75f commit 28f5983
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/interaction-middleware/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"context"
"fmt"
"log"
"os"

Expand Down Expand Up @@ -65,13 +66,13 @@ func slackerInteractive(ctx *slacker.InteractionContext) {
func LoggingInteractionMiddleware() slacker.InteractionMiddlewareHandler {
return func(next slacker.InteractionHandler) slacker.InteractionHandler {
return func(ctx *slacker.InteractionContext) {
ctx.Logger().Info(
ctx.Logger().Info(fmt.Sprintf(
"%s initiated \"%s\" with action \"%v\" in channel %s",
ctx.Callback().User.ID,
ctx.Definition().BlockID,
ctx.Callback().ActionCallback.BlockActions[0].ActionID,
ctx.Callback().Channel.ID,
)
))
next(ctx)
}
}
Expand Down

0 comments on commit 28f5983

Please sign in to comment.