Skip to content

Commit a1a8c38

Browse files
committed
version 1.8.0
1 parent 008758e commit a1a8c38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1869
-800
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ <h1 class="title">Module <code>slack_bolt.adapter.aws_lambda.handler</code></h1>
113113
if event[&#34;isBase64Encoded&#34;]:
114114
body = base64.b64decode(body).decode(&#34;utf-8&#34;)
115115
cookies: Sequence[str] = event.get(&#34;cookies&#34;, [])
116+
if cookies is None or len(cookies) == 0:
117+
# In the case of format v1
118+
multiValueHeaders = event.get(&#34;multiValueHeaders&#34;, {})
119+
cookies = multiValueHeaders.get(&#34;Cookie&#34;, [])
116120
headers = event.get(&#34;headers&#34;, {})
117121
headers[&#34;cookie&#34;] = cookies
118122
return BoltRequest(
@@ -202,6 +206,10 @@ <h2 class="section-title" id="header-functions">Functions</h2>
202206
if event[&#34;isBase64Encoded&#34;]:
203207
body = base64.b64decode(body).decode(&#34;utf-8&#34;)
204208
cookies: Sequence[str] = event.get(&#34;cookies&#34;, [])
209+
if cookies is None or len(cookies) == 0:
210+
# In the case of format v1
211+
multiValueHeaders = event.get(&#34;multiValueHeaders&#34;, {})
212+
cookies = multiValueHeaders.get(&#34;Cookie&#34;, [])
205213
headers = event.get(&#34;headers&#34;, {})
206214
headers[&#34;cookie&#34;] = cookies
207215
return BoltRequest(

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ <h1 class="title">Module <code>slack_bolt.adapter.aws_lambda.lambda_s3_oauth_flo
9191
# In this case, the /slack/events endpoint doesn&#39;t work along with the OAuth flow.
9292
settings.authorize = InstallationStoreAuthorize(
9393
logger=logger,
94+
client_id=settings.client_id,
95+
client_secret=settings.client_secret,
9496
installation_store=settings.installation_store,
9597
bot_only=settings.installation_store_bot_only,
9698
)
@@ -186,6 +188,8 @@ <h2 id="args">Args</h2>
186188
# In this case, the /slack/events endpoint doesn&#39;t work along with the OAuth flow.
187189
settings.authorize = InstallationStoreAuthorize(
188190
logger=logger,
191+
client_id=settings.client_id,
192+
client_secret=settings.client_secret,
189193
installation_store=settings.installation_store,
190194
bot_only=settings.installation_store_bot_only,
191195
)

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ <h1 class="title">Module <code>slack_bolt.adapter.aws_lambda.local_lambda_client
4242

4343
def invoke(
4444
self,
45-
FunctionName: str = None,
45+
FunctionName: str,
4646
InvocationType: str = &#34;Event&#34;,
4747
Payload: str = &#34;{}&#34;,
4848
) -&gt; InvokeResponse:
@@ -84,7 +84,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
8484

8585
def invoke(
8686
self,
87-
FunctionName: str = None,
87+
FunctionName: str,
8888
InvocationType: str = &#34;Event&#34;,
8989
Payload: str = &#34;{}&#34;,
9090
) -&gt; InvokeResponse:
@@ -104,7 +104,7 @@ <h3>Ancestors</h3>
104104
<h3>Methods</h3>
105105
<dl>
106106
<dt id="slack_bolt.adapter.aws_lambda.local_lambda_client.LocalLambdaClient.invoke"><code class="name flex">
107-
<span>def <span class="ident">invoke</span></span>(<span>self, FunctionName: str = None, InvocationType: str = 'Event', Payload: str = '{}') ‑> chalice.test.InvokeResponse</span>
107+
<span>def <span class="ident">invoke</span></span>(<span>self, FunctionName: str, InvocationType: str = 'Event', Payload: str = '{}') ‑> chalice.test.InvokeResponse</span>
108108
</code></dt>
109109
<dd>
110110
<div class="desc"></div>
@@ -114,7 +114,7 @@ <h3>Methods</h3>
114114
</summary>
115115
<pre><code class="python">def invoke(
116116
self,
117-
FunctionName: str = None,
117+
FunctionName: str,
118118
InvocationType: str = &#34;Event&#34;,
119119
Payload: str = &#34;{}&#34;,
120120
) -&gt; InvokeResponse:

docs/api-docs/slack_bolt/adapter/sanic/async_handler.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ <h1 class="title">Module <code>slack_bolt.adapter.sanic.async_handler</code></h1
5959
resp.cookies[name][&#34;expires&#34;] = expire
6060
resp.cookies[name][&#34;path&#34;] = c.get(&#34;path&#34;)
6161
resp.cookies[name][&#34;domain&#34;] = c.get(&#34;domain&#34;)
62-
resp.cookies[name][&#34;max-age&#34;] = c.get(&#34;max-age&#34;)
62+
if c.get(&#34;max-age&#34;) is not None and len(c.get(&#34;max-age&#34;)) &gt; 0:
63+
resp.cookies[name][&#34;max-age&#34;] = int(c.get(&#34;max-age&#34;))
6364
resp.cookies[name][&#34;secure&#34;] = True
6465
resp.cookies[name][&#34;httponly&#34;] = True
6566
return resp
@@ -142,7 +143,8 @@ <h2 class="section-title" id="header-functions">Functions</h2>
142143
resp.cookies[name][&#34;expires&#34;] = expire
143144
resp.cookies[name][&#34;path&#34;] = c.get(&#34;path&#34;)
144145
resp.cookies[name][&#34;domain&#34;] = c.get(&#34;domain&#34;)
145-
resp.cookies[name][&#34;max-age&#34;] = c.get(&#34;max-age&#34;)
146+
if c.get(&#34;max-age&#34;) is not None and len(c.get(&#34;max-age&#34;)) &gt; 0:
147+
resp.cookies[name][&#34;max-age&#34;] = int(c.get(&#34;max-age&#34;))
146148
resp.cookies[name][&#34;secure&#34;] = True
147149
resp.cookies[name][&#34;httponly&#34;] = True
148150
return resp</code></pre>

0 commit comments

Comments
 (0)