mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-11-03 22:32:27 +08:00
feat(onebot): support main-port reverse and forward WebSocket connections
This commit is contained in:
@@ -288,6 +288,10 @@ const BotForm = forwardRef<BotFormHandle, BotFormProps>(function BotForm(
|
||||
() => ({
|
||||
bot_uuid: initBotId,
|
||||
webhook_url: webhookUrl,
|
||||
onebot_ws_url: webhookUrl
|
||||
? webhookUrl.replace(/^http/, 'ws').replace(/\/$/, '') +
|
||||
'/onebot/v11/ws'
|
||||
: '',
|
||||
extra_webhook_url: extraWebhookUrl,
|
||||
adapter_config: { title: embedTitle },
|
||||
outbound_ips: systemInfo.outbound_ips,
|
||||
|
||||
@@ -1823,6 +1823,10 @@ function StepBotConfig({
|
||||
systemContext={{
|
||||
is_wizard: true,
|
||||
webhook_url: webhookUrl,
|
||||
onebot_ws_url: webhookUrl
|
||||
? webhookUrl.replace(/^http/, 'ws').replace(/\/$/, '') +
|
||||
'/onebot/v11/ws'
|
||||
: '',
|
||||
extra_webhook_url: extraWebhookUrl,
|
||||
outbound_ips: systemInfo.outbound_ips,
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user