Skip to content

feat(telegram): add support for video and voice messages#451

Open
kofany wants to merge 1 commit intoRITlug:mainfrom
kofany:fix-video-voice-handlers
Open

feat(telegram): add support for video and voice messages#451
kofany wants to merge 1 commit intoRITlug:mainfrom
kofany:fix-video-voice-handlers

Conversation

@kofany
Copy link
Copy Markdown

@kofany kofany commented Dec 7, 2025

This pull request adds support for handling video and voice messages received from Telegram and forwarding notifications about these messages to IRC. It introduces new handler functions for both video and voice messages, updates the main update handler to trigger these functions, and adds comprehensive tests to ensure the new handlers work correctly with and without captions.

Telegram Message Handling Enhancements:

  • Added support for handling incoming video and voice messages in the main update handler by triggering videoHandler and voiceHandler when appropriate (handler.go).
  • Implemented the videoHandler and voiceHandler functions to format and send notifications to IRC, including handling message captions if present (handler.go).

Testing Improvements:

  • Added unit tests for videoHandler and voiceHandler, covering cases with and without captions to ensure correct message formatting and IRC notification (handler_test.go).

Add handlers for Telegram video and voice messages that were previously
falling through to the default case, causing unhandled message warnings.

- Add videoHandler to notify IRC when videos are shared
- Add voiceHandler to notify IRC when voice messages are shared
- Include caption support for both message types
- Add unit tests for new handlers

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant