Merge PR #957: fix(slack): add exception handling to socket listener
This commit is contained in:
@@ -179,6 +179,7 @@ class SlackChannel(BaseChannel):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.debug("Slack reactions_add failed: {}", e)
|
logger.debug("Slack reactions_add failed: {}", e)
|
||||||
|
|
||||||
|
try:
|
||||||
await self._handle_message(
|
await self._handle_message(
|
||||||
sender_id=sender_id,
|
sender_id=sender_id,
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
@@ -191,6 +192,8 @@ class SlackChannel(BaseChannel):
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
except Exception:
|
||||||
|
logger.exception("Error handling Slack message from {}", sender_id)
|
||||||
|
|
||||||
def _is_allowed(self, sender_id: str, chat_id: str, channel_type: str) -> bool:
|
def _is_allowed(self, sender_id: str, chat_id: str, channel_type: str) -> bool:
|
||||||
if channel_type == "im":
|
if channel_type == "im":
|
||||||
|
|||||||
Reference in New Issue
Block a user