File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,16 @@ export function stripBotName(text: string, botName: string) {
109109 return text . split ( new RegExp ( `^.*<@${ botName } > ` ) ) . join ( '' ) ;
110110}
111111
112+ /**
113+ * Extracts the action name and type from a Slack interaction payload.
114+ *
115+ * This function supports both shortcut and block action payloads:
116+ * - Shortcuts can be triggered from menus such as the "More actions" button on messages.
117+ * - Block actions come from interactive Block Kit components.
118+ *
119+ * Because all these events are handled as "actions" in the integration, this helper
120+ * centralizes how we derive the action name and type from the event payload.
121+ */
112122export function getActionNameAndType ( payload : any ) {
113123 let actionId : string | undefined ;
114124
You can’t perform that action at this time.
0 commit comments