Revert "Revert "TP-0000 | restricting incident creation from private channels"" (#63)

* Revert "Revert "TP-0000 | restricting incident creation from private channels (#60)" (#62)"

This reverts commit b3eed5dd63.

* TP-0000 | allow incident creation from channels where houston is invited

* TP-0000 | renaming functions

* TP-0000 | making desc mandatory
This commit is contained in:
Shubham Kirve
2023-05-11 17:56:34 +05:30
committed by GitHub Enterprise
parent b3eed5dd63
commit b135eade9c
6 changed files with 41 additions and 8 deletions

View File

@@ -4,6 +4,7 @@ import (
"fmt"
"houston/internal/processor/action"
"houston/model/incident"
"houston/pkg/slackbot"
"github.com/slack-go/slack/socketmode"
"go.uber.org/zap"
@@ -15,11 +16,11 @@ type SlashCommandProcessor struct {
slashCommandAction *action.SlashCommandAction
}
func NewSlashCommandProcessor(logger *zap.Logger, socketModeClient *socketmode.Client, incidentService *incident.Repository) *SlashCommandProcessor {
func NewSlashCommandProcessor(logger *zap.Logger, socketModeClient *socketmode.Client, incidentService *incident.Repository, slackBot *slackbot.Client) *SlashCommandProcessor {
return &SlashCommandProcessor{
logger: logger,
socketModeClient: socketModeClient,
slashCommandAction: action.NewSlashCommandAction(incidentService, logger, socketModeClient),
slashCommandAction: action.NewSlashCommandAction(incidentService, logger, socketModeClient, slackBot),
}
}