Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Commit 0dc08a3

Browse files
Do not fetch channel activity for threads. (#5500)
1 parent 02dc80a commit 0dc08a3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/dispatch/plugins/dispatch_slack/events.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ def fetch_activity(client: WebClient, subject: None, oldest: str = "0") -> List:
3131
log.warning("No conversation provided. Cannot fetch channel activity.")
3232
elif not subject.conversation.channel_id:
3333
log.warning("No channel id provided. Cannot fetch channel activity.")
34+
elif subject.conversation.thread_id:
35+
log.warning(
36+
"Subject is a thread, not a channel. Fetching channel activity is not applicable for threads."
37+
)
3438
else:
3539
return get_channel_activity(
3640
client, conversation_id=subject.conversation.channel_id, oldest=oldest

0 commit comments

Comments
 (0)