You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gpt-pilot/extensions/telegram
hnshah c7f021f70f
fix: preflight invalid telegram photos (#52545) (thanks @hnshah)
* fix(telegram): validate photo dimensions before sendPhoto

Prevents PHOTO_INVALID_DIMENSIONS errors by checking image dimensions
against Telegram Bot API requirements before calling sendPhoto.

If dimensions exceed limits (width + height > 10,000px), automatically
falls back to sending as document instead of crashing with 400 error.

Tested in production (openclaw 2026.3.13) where this error occurred:
  [telegram] tool reply failed: GrammyError: Call to 'sendPhoto' failed!
  (400: Bad Request: PHOTO_INVALID_DIMENSIONS)

Uses existing sharp dependency to read image metadata. Gracefully
degrades if sharp fails (lets Telegram handle validation, backward
compatible behavior).

Closes: #XXXXX (will reference OpenClaw issue if one exists)

* fix(telegram): validate photo aspect ratio

* refactor: use shared telegram image metadata

* fix: fail closed on telegram image metadata

* fix: preflight invalid telegram photos (#52545) (thanks @hnshah)

---------

Co-authored-by: Bob Shah <bobshah@Macs-Mac-Studio.local>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
8 months ago
..
src fix: preflight invalid telegram photos (#52545) (thanks @hnshah) 8 months ago
allow-from.ts perf: split telegram audit runtime seams 8 months ago
api.ts refactor: route extension seams through public apis 8 months ago
index.ts refactor: clean extension api boundaries 8 months ago
openclaw.plugin.json chore: Run `pnpm format:fix`. 10 months ago
package.json build: bump version to 2026.3.22 8 months ago
runtime-api.ts fix: harden plugin docker e2e 8 months ago
setup-entry.ts refactor: clean extension api boundaries 8 months ago