Skip to content

fix(telegram): Telegram streaming first message shows only 1-2 characters in iOS push notifications #18148

@Marvae

Description

@Marvae

Bug Description

When using streaming mode for Telegram replies, the first message sent via sendMessage may contain only 1-2 characters (e.g., "我" or "I"). Since iOS push notifications display the content of the first message, users see meaningless notifications.

Steps to Reproduce

  1. Configure Telegram with streaming enabled (streamMode: partial or full)
  2. Send a message that triggers a streaming response
  3. Lock the phone and wait for push notification
  4. Observe push notification content

Expected Behavior

Push notification should display meaningful content (e.g., the beginning of a sentence, at least 20-30 characters).

Actual Behavior

Push notification shows only 1-2 characters like "我" or "I" because the draft stream sends the first message immediately when any content is available.

Environment

  • OS: iOS
  • Channel: Telegram
  • Stream mode: partial/full

Proposed Solution

Add a debounce mechanism to delay the first streaming message until it reaches a minimum character threshold (e.g., 30 chars). Short complete responses should still be sent immediately when streaming ends.

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