Skip to content

Feishu video messages (message_type='media') not downloaded #25499

@4ier

Description

@4ier

Bug Description

Feishu video messages sent via the mobile app use message_type: "media" instead of "video". The current feishu plugin only handles "video" in its media type checks, causing video messages to be silently dropped (no download, raw JSON metadata passed to agent instead).

Root Cause

Three locations in extensions/feishu/src/bot.ts need to handle "media" as a video type:

  1. resolveFeishuMediaList()mediaTypes array missing "media"
  2. parseMediaKeys() — switch/case missing "media", falls through to default: return {}
  3. inferPlaceholder() — switch/case missing "media", returns generic placeholder

Steps to Reproduce

  1. Send a video to the Feishu bot from Feishu mobile app
  2. Observe: agent receives raw JSON {"file_key":"...","file_name":"...mp4","image_key":"...","duration":15016} instead of the actual video file
  3. Gateway log shows msgType=media (not msgType=video)

Expected Behavior

Video should be downloaded and saved to disk, agent should receive the video file with <media:video> placeholder.

Fix

Add "media" alongside "video" in all three locations:

- const mediaTypes = ["image", "file", "audio", "video", "sticker", "post"];
+ const mediaTypes = ["image", "file", "audio", "video", "media", "sticker", "post"];

  // In parseMediaKeys():
  case "video":
+ case "media":
    return { fileKey, imageKey };

  // In inferPlaceholder():
  case "video":
+ case "media":
    return "<media:video>";

Tested

  • Hotpatched extensions/feishu/src/bot.ts on OpenClaw v2026.2.23
  • Sent video via Feishu mobile → video downloaded successfully, agent received video content with description
  • Before fix: raw JSON metadata only
  • After fix: full video file downloaded + AI-generated description received

Environment

  • OpenClaw: v2026.2.23
  • Feishu plugin: @openclaw/feishu v2026.2.23
  • Feishu app: mobile (Android)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions