Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@aduk059
Copy link
Contributor

@aduk059 aduk059 commented Jan 27, 2026

Description

This PR adds support for Telegram Bot API quote feature that allows users to reply to specific parts of messages instead of entire messages.

Changes

  1. Enhanced describeReplyTarget() in telegram/bot/helpers.ts:

    • Detects and extracts quoted text from msg.quote field
    • Added isQuote flag to distinguish quote vs regular reply
    • Preserves original functionality for full message replies
  2. Updated reply formatting in telegram/bot-message-context.ts:

    • Quote replies: [Quoting @user id:123] "quoted portion" [/Quoting]
    • Regular replies: [Replying to @user id:123] Full message text [/Replying]

Features

  • Detects when user replies to partial quote vs full message
  • Formats quoted text with quotation marks for clarity
  • Backward compatible with existing reply functionality
  • No breaking changes to current behavior

Testing

Tested with live Telegram bot - quote functionality works correctly:

  • Selecting text and replying shows quoted portion only
  • Regular replies show full message as before
  • No regressions in existing functionality

AI Disclosure

  • AI-assisted
  • Fully tested
  • I understand what the code does

References

  • Telegram Bot API - Message object (quote field)
  • Telegram Bot API - TextQuote

Author: A. Duk (@aduk059)

- Enhanced describeReplyTarget() to detect and extract quoted text from msg.quote
- Updated reply formatting to distinguish between full message replies and quotes
- Added isQuote flag to replyTarget object for proper identification
- Quote replies show as [Quoting user] "quoted text" [/Quoting]
- Regular replies unchanged: [Replying to user] full message [/Replying]

Resolves need for partial message reply support in Telegram Bot API.
Backward compatible with existing reply functionality.
@moltbot-barnacle moltbot-barnacle bot added the channel: telegram Channel integration: telegram label Jan 27, 2026
@gumadeiras gumadeiras self-requested a review January 27, 2026 19:42
gumadeiras and others added 14 commits January 27, 2026 15:59
…ency

Directory renames:
- apps/macos/Sources/Clawdbot → Moltbot
- apps/macos/Sources/ClawdbotDiscovery → MoltbotDiscovery
- apps/macos/Sources/ClawdbotIPC → MoltbotIPC
- apps/macos/Sources/ClawdbotMacCLI → MoltbotMacCLI
- apps/macos/Sources/ClawdbotProtocol → MoltbotProtocol
- apps/macos/Tests/ClawdbotIPCTests → MoltbotIPCTests
- apps/shared/ClawdbotKit → MoltbotKit
- apps/shared/MoltbotKit/Sources/Clawdbot* → Moltbot*
- apps/shared/MoltbotKit/Tests/ClawdbotKitTests → MoltbotKitTests

Resource renames:
- Clawdbot.icns → Moltbot.icns

Code fixes:
- Update Package.swift paths to reference Moltbot* directories
- Fix clawdbot* → moltbot* symbol references in Swift code:
  - clawdbotManagedPaths → moltbotManagedPaths
  - clawdbotExecutable → moltbotExecutable
  - clawdbotCommand → moltbotCommand
  - clawdbotNodeCommand → moltbotNodeCommand
  - clawdbotOAuthDirEnv → moltbotOAuthDirEnv
  - clawdbotSelectSettingsTab → moltbotSelectSettingsTab
- scripts/bundle-a2ui.sh: A2UI_APP_DIR path
- package.json: format:swift and protocol:check paths
- scripts/protocol-gen-swift.ts: output paths
- .github/dependabot.yml: directory path and comment
- .gitignore: build cache paths
- .swiftformat: exclusion paths
- .swiftlint.yml: exclusion path
- apps/android/app/build.gradle.kts: assets.srcDir path
- apps/ios/project.yml: package path
- apps/ios/README.md: documentation reference
- docs/concepts/typebox.md: documentation reference
- apps/shared/MoltbotKit/Package.swift: fix argument order
The cron-protocol-conformance test was using LEGACY_MACOS_APP_SOURCES_DIR
which points to the old Clawdbot path. Added a new MACOS_APP_SOURCES_DIR
constant for the current Moltbot path and updated the test to use it.
The security audit was incorrectly flagging venice/claude-opus-45 as
'Below Claude 4.5' because the regex expected -4-5 (with dash) but
Venice uses -45 (without dash between 4 and 5).

Updated isClaude45OrHigher() regex to match both formats.
Added test case to prevent regression.
@gumadeiras gumadeiras merged commit 284b54a into openclaw:main Jan 27, 2026
1 check passed
@moltbot-barnacle moltbot-barnacle bot added docs Improvements or additions to documentation app: android App: android app: ios App: ios app: macos App: macos gateway Gateway runtime extensions: memory-core Extension: memory-core cli CLI command changes scripts Repository scripts commands Command implementations agents Agent runtime and tooling labels Jan 27, 2026
@gumadeiras
Copy link
Contributor

Landed via temp rebase onto main.

  • Gate: pnpm lint && pnpm build && pnpm test
  • Land commit: 284b54a
  • Merge commit: 284b54a

Thanks @aduk059!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: android App: android app: ios App: ios app: macos App: macos channel: telegram Channel integration: telegram cli CLI command changes commands Command implementations docs Improvements or additions to documentation extensions: memory-core Extension: memory-core gateway Gateway runtime scripts Repository scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants