fix: wire pollingTimeoutSec from config to TelegramClient
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+4
-1
@@ -17,6 +17,7 @@ export interface TelegramBridgeOptions {
|
||||
provider?: string
|
||||
model?: string
|
||||
maxMessageLength?: number
|
||||
pollingTimeoutSec?: number
|
||||
cwd?: string
|
||||
}
|
||||
|
||||
@@ -63,7 +64,9 @@ export class TelegramBridge {
|
||||
this.token = options.token
|
||||
this.allowedUserIds = options.allowedUserIds
|
||||
this.allowAllUsers = options.allowAllUsers
|
||||
this.client = options.client ?? new TelegramClient(options.token)
|
||||
this.client = options.client ?? new TelegramClient(options.token, {
|
||||
pollingTimeoutSec: options.pollingTimeoutSec ?? 30,
|
||||
})
|
||||
this.sleep = options.sleep ?? defaultSleep
|
||||
this.provider = options.provider ?? 'deepseek-official'
|
||||
this.model = options.model ?? 'deepseek-v4-flash'
|
||||
|
||||
@@ -44,6 +44,7 @@ export function apply(ctx: Context, config: TelegramChannelConfig): void {
|
||||
provider: config.provider ?? 'deepseek-official',
|
||||
model: config.model ?? 'deepseek-v4-flash',
|
||||
maxMessageLength: config.maxMessageLength ?? 4096,
|
||||
pollingTimeoutSec: config.pollingTimeoutSec ?? 30,
|
||||
cwd: config.cwd ?? process.cwd(),
|
||||
})
|
||||
ctx.effect(() => {
|
||||
|
||||
Reference in New Issue
Block a user