Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Commit 66b37e5

Browse files
committed
feat: add common file for signal folder
1 parent 29240bc commit 66b37e5

File tree

1 file changed

+36
-0
lines changed
  • src/dispatch/plugins/dispatch_slack/signal

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
from blockkit import Context, Divider, MarkdownText, Modal, Section
2+
from slack_bolt import Ack
3+
4+
5+
def ack_mfa_required_submission_event(
6+
ack: Ack, mfa_enabled: bool, challenge_url: str | None = None
7+
) -> None:
8+
"""Handles the add engagement submission event acknowledgement."""
9+
10+
if mfa_enabled:
11+
mfa_text = (
12+
"🔐 To complete this action, you need to verify your identity through Multi-Factor Authentication (MFA).\n\n"
13+
f"Please <{challenge_url}|click here> to open the MFA verification page."
14+
)
15+
else:
16+
mfa_text = "✅ No additional verification required. You can proceed with the confirmation."
17+
18+
blocks = [
19+
Section(text=mfa_text),
20+
Divider(),
21+
Context(
22+
elements=[
23+
MarkdownText(
24+
text="💡 This step protects against unauthorized confirmation if your account is compromised."
25+
)
26+
]
27+
),
28+
]
29+
30+
modal = Modal(
31+
title="Confirm Your Identity",
32+
close="Cancel",
33+
blocks=blocks,
34+
).build()
35+
36+
ack(response_action="update", view=modal)

0 commit comments

Comments
 (0)