fix: eliminate host config

This commit is contained in:
wangcham
2025-03-31 01:10:45 -04:00
parent 5744eca37a
commit 686be4acbc
3 changed files with 4 additions and 4 deletions

View File

@@ -16,11 +16,12 @@ class SlackEvent(dict):
for el in elements:
if el.get("type") == "text":
return el.get("text", "")
if self.get("event",{}).get("channel_type") == 'channel':
if self.get("event",{}).get("channel_type") == 'channel':
message_text = next((el["text"] for block in self.get("event", {}).get("blocks", []) if block.get("type") == "rich_text" for element in block.get("elements", []) if element.get("type") == "rich_text_section" for el in element.get("elements", []) if el.get("type") == "text"), "")
return message_text
return ""