Skip to content

Commit 1ded1f4

Browse files
Update slack_bolt/context/get_thread_context/get_thread_context.py
Co-authored-by: William Bergamin <wbergamin@salesforce.com>
1 parent d9b0117 commit 1ded1f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

slack_bolt/context/get_thread_context/get_thread_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __call__(self) -> Optional[AssistantThreadContext]:
3232
return self._thread_context
3333

3434
thread = self.payload.get("assistant_thread")
35-
if thread is not None and thread.get("context", {}).get("channel_id") is not None:
35+
if isinstance(thread, dict) and thread.get("context", {}).get("channel_id") is not None:
3636
# assistant_thread_started
3737
self._thread_context = AssistantThreadContext(thread["context"])
3838
# for this event, the context will never be changed

0 commit comments

Comments
 (0)