Skip to content

Commit

Permalink
version 1.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Aug 28, 2021
1 parent 05951c6 commit 1272f89
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
27 changes: 9 additions & 18 deletions docs/api-docs/slack_bolt/adapter/aws_lambda/handler.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,17 @@ <h1 class="title">Module <code>slack_bolt.adapter.aws_lambda.handler</code></h1>


def to_bolt_request(event) -&gt; BoltRequest:
&#34;&#34;&#34;Note that this handler supports only the payload format 2.0.
This means you can use this with HTTP API while REST API is not supported.

Read https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
for more details.
&#34;&#34;&#34;
body = event.get(&#34;body&#34;, &#34;&#34;)
if event[&#34;isBase64Encoded&#34;]:
body = base64.b64decode(body).decode(&#34;utf-8&#34;)
cookies: Sequence[str] = event.get(&#34;cookies&#34;, [])
if cookies is None or len(cookies) == 0:
# In the case of format v1
multiValueHeaders = event.get(&#34;multiValueHeaders&#34;, {})
cookies = multiValueHeaders.get(&#34;Cookie&#34;, [])
cookies = multiValueHeaders.get(&#34;cookie&#34;, [])
if len(cookies) == 0:
# Try using uppercase
cookies = multiValueHeaders.get(&#34;Cookie&#34;, [])
headers = event.get(&#34;headers&#34;, {})
headers[&#34;cookie&#34;] = cookies
return BoltRequest(
Expand Down Expand Up @@ -187,29 +184,23 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<span>def <span class="ident">to_bolt_request</span></span>(<span>event) ‑> <a title="slack_bolt.request.request.BoltRequest" href="../../request/request.html#slack_bolt.request.request.BoltRequest">BoltRequest</a></span>
</code></dt>
<dd>
<div class="desc"><p>Note that this handler supports only the payload format 2.0.
This means you can use this with HTTP API while REST API is not supported.</p>
<p>Read <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html">https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html</a>
for more details.</p></div>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def to_bolt_request(event) -&gt; BoltRequest:
&#34;&#34;&#34;Note that this handler supports only the payload format 2.0.
This means you can use this with HTTP API while REST API is not supported.

Read https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
for more details.
&#34;&#34;&#34;
body = event.get(&#34;body&#34;, &#34;&#34;)
if event[&#34;isBase64Encoded&#34;]:
body = base64.b64decode(body).decode(&#34;utf-8&#34;)
cookies: Sequence[str] = event.get(&#34;cookies&#34;, [])
if cookies is None or len(cookies) == 0:
# In the case of format v1
multiValueHeaders = event.get(&#34;multiValueHeaders&#34;, {})
cookies = multiValueHeaders.get(&#34;Cookie&#34;, [])
cookies = multiValueHeaders.get(&#34;cookie&#34;, [])
if len(cookies) == 0:
# Try using uppercase
cookies = multiValueHeaders.get(&#34;Cookie&#34;, [])
headers = event.get(&#34;headers&#34;, {})
headers[&#34;cookie&#34;] = cookies
return BoltRequest(
Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/version.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h1 class="title">Module <code>slack_bolt.version</code></h1>
<span>Expand source code</span>
</summary>
<pre><code class="python">&#34;&#34;&#34;Check the latest version at https://pypi.org/project/slack-bolt/&#34;&#34;&#34;
__version__ = &#34;1.8.0&#34;</code></pre>
__version__ = &#34;1.8.1&#34;</code></pre>
</details>
</section>
<section>
Expand Down
2 changes: 1 addition & 1 deletion slack_bolt/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""Check the latest version at https://pypi.org/project/slack-bolt/"""
__version__ = "1.8.0"
__version__ = "1.8.1"

0 comments on commit 1272f89

Please sign in to comment.