You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/telegram.md
+17-5Lines changed: 17 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,16 +40,24 @@ Set environment variables:
40
40
41
41
OAB config (`config.toml`):
42
42
43
-
**Minimal** — just pass the API key to the agent:
43
+
**Minimal** — bot token via env var, API key passed to agent:
44
44
45
45
```toml
46
+
[telegram]
47
+
bot_token = "${TELEGRAM_BOT_TOKEN}"
48
+
allow_all_users = true
49
+
46
50
[agent]
47
51
env = { KIRO_API_KEY = "${KIRO_API_KEY}" }
48
52
```
49
53
50
-
**Recommended** — with tuned pool, streaming, and native table rendering:
54
+
**Recommended** — with access control, tuned pool, and streaming:
51
55
52
56
```toml
57
+
[telegram]
58
+
bot_token = "${TELEGRAM_BOT_TOKEN}"
59
+
allowed_users = ["176096071"]
60
+
53
61
[agent]
54
62
env = { KIRO_API_KEY = "${KIRO_API_KEY}" }
55
63
@@ -59,9 +67,13 @@ session_ttl_hours = 1
59
67
60
68
[reactions]
61
69
tool_display = "compact"
70
+
```
71
+
72
+
Table rendering is automatically disabled for Telegram (tables pass through as native markdown for Rich Messages). To force code-block wrapping, set explicitly:
62
73
74
+
```toml
63
75
[markdown]
64
-
tables = "off"
76
+
tables = "code"
65
77
```
66
78
67
79
Streaming is enabled by default when Rich Messages are active — replies are streamed live via `sendRichMessageDraft` with rich formatting, then finalized with `sendRichMessage`. If `TELEGRAM_RICH_MESSAGES=false`, streaming is also disabled by default. To override, set `TELEGRAM_STREAMING=true` or `TELEGRAM_STREAMING=false` explicitly.
@@ -356,11 +368,11 @@ Agent replies are rendered with Telegram Markdown: **bold**, `code`, and code bl
356
368
357
369
With **Rich Messages** enabled (default, requires Bot API 10.1+), headings (`##`) and tables render with full formatting via `sendRichMessage`. Code blocks remain on the legacy path for syntax highlighting and copy-button support. Content exceeding 4096 characters is automatically handled via rich messages (up to 32768 chars).
358
370
359
-
> **Important:** OAB's default table mode wraps markdown tables in code blocks before they reach the gateway. To allow native Telegram table rendering via Rich Messages, disable this conversion in your `config.toml`:
371
+
> **Note:** As of v0.9.0, OAB automatically disables table code-block wrapping for Telegram adapters (both unified and standalone gateway) when Rich Messages are enabled. Tables pass through as raw markdown and render natively. No `[markdown]` config is needed. To override this and force code-block wrapping, add:
360
372
>
361
373
> ```toml
362
374
> [markdown]
363
-
> tables = "off"
375
+
> tables = "code"
364
376
> ```
365
377
>
366
378
> Rich Messages requires gateway version **v0.6.0-rc.1** or above (`ghcr.io/openabdev/openab-gateway:v0.6.0-rc.1`+).
0 commit comments