@@ -43,9 +43,7 @@ <h1 class="title">Module <code>slack_bolt.adapter.aws_lambda.handler</code></h1>
4343 def __init__(self, app: App): # type: ignore
4444 self.app = app
4545 self.logger = get_bolt_app_logger(app.name, SlackRequestHandler, app.logger)
46- self.app.listener_runner.lazy_listener_runner = LambdaLazyListenerRunner(
47- self.logger
48- )
46+ self.app.listener_runner.lazy_listener_runner = LambdaLazyListenerRunner(self.logger)
4947 if self.app.oauth_flow is not None:
5048 self.app.oauth_flow.settings.redirect_uri_page_renderer.install_path = "?"
5149
@@ -72,10 +70,7 @@ <h1 class="title">Module <code>slack_bolt.adapter.aws_lambda.handler</code></h1>
7270 bolt_req: BoltRequest = to_bolt_request(event)
7371 query = bolt_req.query
7472 is_callback = query is not None and (
75- (
76- _first_value(query, "code") is not None
77- and _first_value(query, "state") is not None
78- )
73+ (_first_value(query, "code") is not None and _first_value(query, "state") is not None)
7974 or _first_value(query, "error") is not None
8075 )
8176 if is_callback:
@@ -89,6 +84,7 @@ <h1 class="title">Module <code>slack_bolt.adapter.aws_lambda.handler</code></h1>
8984 # https://docs.aws.amazon.com/lambda/latest/dg/python-context.html
9085 aws_lambda_function_name = context.function_name
9186 bolt_req.context["aws_lambda_function_name"] = aws_lambda_function_name
87+ bolt_req.context["aws_lambda_invoked_function_arn"] = context.invoked_function_arn
9288 bolt_req.context["lambda_request"] = event
9389 bolt_resp = self.app.dispatch(bolt_req)
9490 aws_response = to_aws_response(bolt_resp)
@@ -229,9 +225,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
229225 def __init__(self, app: App): # type: ignore
230226 self.app = app
231227 self.logger = get_bolt_app_logger(app.name, SlackRequestHandler, app.logger)
232- self.app.listener_runner.lazy_listener_runner = LambdaLazyListenerRunner(
233- self.logger
234- )
228+ self.app.listener_runner.lazy_listener_runner = LambdaLazyListenerRunner(self.logger)
235229 if self.app.oauth_flow is not None:
236230 self.app.oauth_flow.settings.redirect_uri_page_renderer.install_path = "?"
237231
@@ -258,10 +252,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
258252 bolt_req: BoltRequest = to_bolt_request(event)
259253 query = bolt_req.query
260254 is_callback = query is not None and (
261- (
262- _first_value(query, "code") is not None
263- and _first_value(query, "state") is not None
264- )
255+ (_first_value(query, "code") is not None and _first_value(query, "state") is not None)
265256 or _first_value(query, "error") is not None
266257 )
267258 if is_callback:
@@ -275,6 +266,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
275266 # https://docs.aws.amazon.com/lambda/latest/dg/python-context.html
276267 aws_lambda_function_name = context.function_name
277268 bolt_req.context["aws_lambda_function_name"] = aws_lambda_function_name
269+ bolt_req.context["aws_lambda_invoked_function_arn"] = context.invoked_function_arn
278270 bolt_req.context["lambda_request"] = event
279271 bolt_resp = self.app.dispatch(bolt_req)
280272 aws_response = to_aws_response(bolt_resp)
@@ -334,10 +326,7 @@ <h3>Methods</h3>
334326 bolt_req: BoltRequest = to_bolt_request(event)
335327 query = bolt_req.query
336328 is_callback = query is not None and (
337- (
338- _first_value(query, "code") is not None
339- and _first_value(query, "state") is not None
340- )
329+ (_first_value(query, "code") is not None and _first_value(query, "state") is not None)
341330 or _first_value(query, "error") is not None
342331 )
343332 if is_callback:
@@ -351,6 +340,7 @@ <h3>Methods</h3>
351340 # https://docs.aws.amazon.com/lambda/latest/dg/python-context.html
352341 aws_lambda_function_name = context.function_name
353342 bolt_req.context["aws_lambda_function_name"] = aws_lambda_function_name
343+ bolt_req.context["aws_lambda_invoked_function_arn"] = context.invoked_function_arn
354344 bolt_req.context["lambda_request"] = event
355345 bolt_resp = self.app.dispatch(bolt_req)
356346 aws_response = to_aws_response(bolt_resp)
0 commit comments