Telegram: add webhookCertPath and skip stale-socket in webhook mode#39313
Telegram: add webhookCertPath and skip stale-socket in webhook mode#39313fellanH wants to merge 1 commit intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR adds two focused fixes for Telegram webhook mode: (1) a Key observations:
Confidence Score: 4/5
Last reviewed commit: b798609 |
| lastEventAt?: number | null; | ||
| lastStartAt?: number | null; | ||
| reconnectAttempts?: number; | ||
| mode?: string; |
There was a problem hiding this comment.
mode is typed as string, but the only values used across the codebase are "webhook" and "polling" (and occasionally undefined). Using a bare string means a typo like "Webhook" or "webhooks" would silently bypass the stale-socket check without any compile-time or runtime error.
Consider narrowing the type:
| mode?: string; | |
| mode?: "webhook" | "polling"; |
This would make the intent clearer and catch incorrect values at compile time.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/gateway/channel-health-policy.ts
Line: 15
Comment:
`mode` is typed as `string`, but the only values used across the codebase are `"webhook"` and `"polling"` (and occasionally `undefined`). Using a bare `string` means a typo like `"Webhook"` or `"webhooks"` would silently bypass the stale-socket check without any compile-time or runtime error.
Consider narrowing the type:
```suggestion
mode?: "webhook" | "polling";
```
This would make the intent clearer and catch incorrect values at compile time.
How can I resolve this? If you propose a fix, please make it concise.Landed from contributor PR #39313 by @fellanH. Co-authored-by: Felix Hellström <[email protected]>
|
Landed on What we shipped:
Landed commits: Thanks @fellanH. |
Landed from contributor PR openclaw#39313 by @fellanH. Co-authored-by: Felix Hellström <[email protected]>
Landed from contributor PR openclaw#39313 by @fellanH. Co-authored-by: Felix Hellström <[email protected]>
Landed from contributor PR openclaw#39313 by @fellanH. Co-authored-by: Felix Hellström <[email protected]>
Landed from contributor PR openclaw#39313 by @fellanH. Co-authored-by: Felix Hellström <[email protected]>
Landed from contributor PR openclaw#39313 by @fellanH. Co-authored-by: Felix Hellström <[email protected]>
Landed from contributor PR openclaw#39313 by @fellanH. Co-authored-by: Felix Hellström <[email protected]>
Landed from contributor PR openclaw#39313 by @fellanH. Co-authored-by: Felix Hellström <[email protected]>
Landed from contributor PR openclaw#39313 by @fellanH. Co-authored-by: Felix Hellström <[email protected]> (cherry picked from commit 9d7d961)
…1796) * fix(ci): stabilize detect-secrets baseline (cherry picked from commit 08597e8) * fix(gateway): distinguish disconnected from stuck in health-monitor restart reason resolveChannelRestartReason did not handle the "disconnected" evaluation reason explicitly, so it fell through to "stuck". This conflates a clean WebSocket drop (e.g. Discord 1006) with a genuinely stuck channel, making logs misleading and preventing future policy differentiation. Add "disconnected" to ChannelRestartReason and handle it before the catch-all "stuck" return. Closes openclaw#36404 (cherry picked from commit 066d589) * fix: land health-monitor disconnected reason label (openclaw#36436) (thanks @Sid-Qin) (cherry picked from commit 1e05f14) * fix: restore Telegram webhook-mode health after restarts Landed from contributor PR openclaw#39313 by @fellanH. Co-authored-by: Felix Hellström <[email protected]> (cherry picked from commit 9d7d961) * fix(chat): preserve sender labels in dashboard history (cherry picked from commit 930caea) * refactor(channels): share native command session targets (cherry picked from commit e381ab6) --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: SidQin-cyber <[email protected]> Co-authored-by: Felix Hellström <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]>
closes #39303