Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions backend/internal/services/slack_event_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,22 @@ func (h *SlackEventHandler) handleReactionAdded(ev *slackevents.ReactionAddedEve
"reaction", ev.Reaction,
"target_status", targetStatus,
"error", err)
return
}

// Refresh the incident card so the Slack message reflects the new status
if updated, err := h.incidentService.GetIncident(incident.ID, 0); err == nil {
h.refreshIncidentCard(updated)
}

// Post public confirmation so the whole team sees who acted
actionText := "acknowledged"
if targetStatus == models.IncidentStatusResolved {
actionText = "resolved"
}
_, _ = h.chatService.PostMessage(incident.SlackChannelID, Message{
Text: fmt.Sprintf("<@%s> %s INC-%d via reaction", ev.User, actionText, incident.IncidentNumber),
})
}

func (h *SlackEventHandler) postToThread(channelID, threadTS, text string) (string, error) {
Expand Down
Loading