Skip to content

Commit 1272f89

Browse files
committed
version 1.8.1
1 parent 05951c6 commit 1272f89

File tree

3 files changed

+11
-20
lines changed

3 files changed

+11
-20
lines changed

docs/api-docs/slack_bolt/adapter/aws_lambda/handler.html

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,17 @@ <h1 class="title">Module <code>slack_bolt.adapter.aws_lambda.handler</code></h1>
103103

104104

105105
def to_bolt_request(event) -&gt; BoltRequest:
106-
&#34;&#34;&#34;Note that this handler supports only the payload format 2.0.
107-
This means you can use this with HTTP API while REST API is not supported.
108-
109-
Read https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
110-
for more details.
111-
&#34;&#34;&#34;
112106
body = event.get(&#34;body&#34;, &#34;&#34;)
113107
if event[&#34;isBase64Encoded&#34;]:
114108
body = base64.b64decode(body).decode(&#34;utf-8&#34;)
115109
cookies: Sequence[str] = event.get(&#34;cookies&#34;, [])
116110
if cookies is None or len(cookies) == 0:
117111
# In the case of format v1
118112
multiValueHeaders = event.get(&#34;multiValueHeaders&#34;, {})
119-
cookies = multiValueHeaders.get(&#34;Cookie&#34;, [])
113+
cookies = multiValueHeaders.get(&#34;cookie&#34;, [])
114+
if len(cookies) == 0:
115+
# Try using uppercase
116+
cookies = multiValueHeaders.get(&#34;Cookie&#34;, [])
120117
headers = event.get(&#34;headers&#34;, {})
121118
headers[&#34;cookie&#34;] = cookies
122119
return BoltRequest(
@@ -187,29 +184,23 @@ <h2 class="section-title" id="header-functions">Functions</h2>
187184
<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>
188185
</code></dt>
189186
<dd>
190-
<div class="desc"><p>Note that this handler supports only the payload format 2.0.
191-
This means you can use this with HTTP API while REST API is not supported.</p>
192-
<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>
193-
for more details.</p></div>
187+
<div class="desc"></div>
194188
<details class="source">
195189
<summary>
196190
<span>Expand source code</span>
197191
</summary>
198192
<pre><code class="python">def to_bolt_request(event) -&gt; BoltRequest:
199-
&#34;&#34;&#34;Note that this handler supports only the payload format 2.0.
200-
This means you can use this with HTTP API while REST API is not supported.
201-
202-
Read https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
203-
for more details.
204-
&#34;&#34;&#34;
205193
body = event.get(&#34;body&#34;, &#34;&#34;)
206194
if event[&#34;isBase64Encoded&#34;]:
207195
body = base64.b64decode(body).decode(&#34;utf-8&#34;)
208196
cookies: Sequence[str] = event.get(&#34;cookies&#34;, [])
209197
if cookies is None or len(cookies) == 0:
210198
# In the case of format v1
211199
multiValueHeaders = event.get(&#34;multiValueHeaders&#34;, {})
212-
cookies = multiValueHeaders.get(&#34;Cookie&#34;, [])
200+
cookies = multiValueHeaders.get(&#34;cookie&#34;, [])
201+
if len(cookies) == 0:
202+
# Try using uppercase
203+
cookies = multiValueHeaders.get(&#34;Cookie&#34;, [])
213204
headers = event.get(&#34;headers&#34;, {})
214205
headers[&#34;cookie&#34;] = cookies
215206
return BoltRequest(

docs/api-docs/slack_bolt/version.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ <h1 class="title">Module <code>slack_bolt.version</code></h1>
2828
<span>Expand source code</span>
2929
</summary>
3030
<pre><code class="python">&#34;&#34;&#34;Check the latest version at https://pypi.org/project/slack-bolt/&#34;&#34;&#34;
31-
__version__ = &#34;1.8.0&#34;</code></pre>
31+
__version__ = &#34;1.8.1&#34;</code></pre>
3232
</details>
3333
</section>
3434
<section>

slack_bolt/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""Check the latest version at https://pypi.org/project/slack-bolt/"""
2-
__version__ = "1.8.0"
2+
__version__ = "1.8.1"

0 commit comments

Comments
 (0)