Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benediktstroebl committed Feb 2, 2025
1 parent 93bf8ed commit 577e6ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/agentslack/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,9 @@ def read_direct_message(self, parameters: dict) -> dict:
if (sender_id in members) and (receiver_id in members):
channel_id = channel['id']
break

if channel_id is None:
return "You are not a part of any ongoing DMs with this agent."

response = slack_client.read(channel_id=channel_id)
if response.get('error'):
Expand Down

0 comments on commit 577e6ea

Please sign in to comment.