mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-09 20:50:58 +00:00
fix: eliminate host config
This commit is contained in:
@@ -16,11 +16,12 @@ class SlackEvent(dict):
|
|||||||
for el in elements:
|
for el in elements:
|
||||||
if el.get("type") == "text":
|
if el.get("type") == "text":
|
||||||
return el.get("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"), "")
|
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 message_text
|
||||||
|
|
||||||
|
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ class SlackAdapter(adapter.MessagePlatformAdapter):
|
|||||||
await asyncio.sleep(1)
|
await asyncio.sleep(1)
|
||||||
|
|
||||||
await self.bot.run_task(
|
await self.bot.run_task(
|
||||||
host=self.config["host"],
|
host="0.0.0.0",
|
||||||
port=self.config["port"],
|
port=self.config["port"],
|
||||||
shutdown_trigger=shutdown_trigger_placeholder,
|
shutdown_trigger=shutdown_trigger_placeholder,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -100,7 +100,6 @@
|
|||||||
"enable":true,
|
"enable":true,
|
||||||
"bot_token":"",
|
"bot_token":"",
|
||||||
"signing_secret":"",
|
"signing_secret":"",
|
||||||
"host":"0.0.0.0",
|
|
||||||
"port":2288
|
"port":2288
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user