Skip to content

[adapter-telegram] video_note (round video messages) not handled in extractAttachments #456

@xbeastx

Description

@xbeastx

Bug Report

Package: @chat-adapter/telegram
Version: 4.27.0
File: packages/adapter-telegram/src/index.ts
Function: extractAttachments (line 1129)

Description

The extractAttachments function handles photo, video, audio, voice, and document attachments, but silently drops video_note messages — Telegram's round (circular) video clips sent by recording in-chat.

When a user sends a video_note, the parsed message has no attachments and no text, resulting in an effectively empty message delivered to the adapter consumer.

Type definition gap

TelegramMessage in src/types.ts also has no video_note field, so the omission is at both the type and runtime level.

Telegram Bot API reference

video_note: https://core.telegram.org/bots/api#videonote

Fields:

  • file_id: string
  • file_unique_id: string
  • length: number (width = height, always equal for round clips)
  • duration: number (seconds)
  • file_size?: number

Expected behavior

A video_note should be extracted as a "video" attachment with width/height set to length, analogous to how video is handled.

Proposed fix

A fix is available in PR #457.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions