TP-0000 | Default ack (#8)

This commit is contained in:
Abhijeet Gupta
2023-03-31 16:51:20 +05:30
committed by GitHub Enterprise
parent 60f1b941b1
commit 267b91036e

View File

@@ -1,6 +1,7 @@
package houston
import (
"fmt"
"houston/entity"
"houston/pkg/postgres/query"
"houston/pkg/slack/houston/command"
@@ -107,7 +108,16 @@ func (bch *HoustonCommandHandler) ProcessButtonHandler(callback slack.Interactio
bch.processIncidentCommands(callback, request)
case "tags":
bch.processTagsCommands(callback, request)
default:
msgOption := slack.MsgOptionText(fmt.Sprintf("We are working on it"), false)
_, err := bch.socketmodeClient.PostEphemeral(callback.Channel.ID, callback.User.ID, msgOption)
if err != nil {
bch.logger.Error("houston slack PostEphemeral command failed for ProcessShowIncidentsButtonCommand.",
zap.String("trigger_id", callback.TriggerID), zap.String("channel_id", callback.Channel.ID), zap.String("user_id", callback.User.ID), zap.Error(err))
return
}
var payload interface{}
bch.socketmodeClient.Ack(*request, payload)
}
}