Skip to content

Commit

Permalink
Merge branch 'main' into expose-auto-ack
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamBergamin authored Oct 21, 2024
2 parents 072ac31 + 840a26b commit ea69eb5
Show file tree
Hide file tree
Showing 10 changed files with 1,187 additions and 87 deletions.
121 changes: 39 additions & 82 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@slack/bolt",
"version": "4.0.0-rc.4",
"version": "4.0.0",
"description": "A framework for building Slack apps, fast.",
"author": "Slack Technologies, LLC",
"license": "MIT",
Expand Down Expand Up @@ -58,7 +58,7 @@
"@tsconfig/node18": "^18.2.4",
"@types/chai": "^4.1.7",
"@types/mocha": "^10.0.1",
"@types/node": "22.7.4",
"@types/node": "22.7.7",
"@types/sinon": "^7.0.11",
"@types/tsscmp": "^1.0.0",
"c8": "^10.1.2",
Expand Down
13 changes: 12 additions & 1 deletion src/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import util from 'node:util';
import { ConsoleLogger, LogLevel, type Logger } from '@slack/logger';
import { type ChatPostMessageArguments, WebClient, type WebClientOptions, addAppMetadata } from '@slack/web-api';
import axios, { type AxiosInstance, type AxiosResponse } from 'axios';
import type { Assistant } from './Assistant';
import {
CustomFunction,
type FunctionCompleteFn,
Expand Down Expand Up @@ -32,7 +33,6 @@ import {
import {
autoAcknowledge,
ignoreSelf as ignoreSelfMiddleware,
isSlackEventMiddlewareArgsOptions,
matchCommandName,
matchConstraints,
matchEventType,
Expand Down Expand Up @@ -505,6 +505,17 @@ export default class App<AppCustomContext extends StringIndexed = StringIndexed>
return this;
}

/**
* Register Assistant middleware
*
* @param assistant global assistant middleware function
*/
public assistant(assistant: Assistant): this {
const m = assistant.getMiddleware();
this.middleware.push(m);
return this;
}

/**
* Register WorkflowStep middleware
*
Expand Down
Loading

0 comments on commit ea69eb5

Please sign in to comment.