Skip to content

Commit 0bd59e1

Browse files
committed
chore: link buttons need to be ack'd
1 parent 3d944a8 commit 0bd59e1

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/bot/events/healthcheck/healthcheck-event-handler.ts

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ import { botLogger } from '../../bot-logger'
1010
import { createHealthCheckModal, getIdValueFromAnswer, HealthcheckModalActions } from './healthcheck-modal-builder'
1111

1212
export function configureHealthCheckEventsHandler(app: App): void {
13+
// User clicks the link to the graph, only needs to ack
14+
app.action(MessageActions.LinkButtonClicked, async ({ ack }) => {
15+
await ack()
16+
})
17+
1318
// User clicks fill out helsesjekk button, so we open the modal with the form
1419
app.action(MessageActions.FillButtonClicked, async ({ ack, action, body, client }) => {
1520
botLogger.info(`User clicked fill out helsesjekk button, opening modal`)

src/bot/messages/message-builder.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { QuestionType } from '../../safe-types'
1111

1212
export const MessageActions = {
1313
FillButtonClicked: 'open_health_check_modal-action',
14+
LinkButtonClicked: 'open_graph_link_message-action',
1415
}
1516

1617
/**
@@ -114,7 +115,7 @@ export function createScoreBlocks(
114115
},
115116
value: 'helsesjekk-link-button',
116117
url: `https://helsesjekk-bot.nav.no/team/${team.assosiatedGroup}/${team.id}/graph`,
117-
action_id: 'button-action',
118+
action_id: MessageActions.LinkButtonClicked,
118119
},
119120
})),
120121
{

0 commit comments

Comments
 (0)