Skip to content

Conversation

@BayramAnnakov
Copy link
Contributor

Summary

Add engagement metrics (views, forwards, reactions) to message output for channel posts.

Changes

  • Add get_engagement_info(message) helper function to extract engagement metrics
  • Update get_messages and list_messages to include engagement info in output

Output Format

Messages from channels now show: | views:X, forwards:Y, reactions:Z

Only displays metrics that are available (channels typically have views/forwards, reactions when enabled).

Example

ID: 123 | Channel Name | Date: 2025-12-26 | views:1542, forwards:23, reactions:89 | Message: Hello world

🤖 Generated with Claude Code

…output

Adds views, forwards, and reaction counts to message output for channel posts.
These metrics are available in Telegram's API for channel content.

Changes:
- get_messages: Include engagement info in output
- list_messages: Include engagement info in output

Example output: 'views:1234, forwards:56, reactions:78'

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@BayramAnnakov
Copy link
Contributor Author

@chigwell please review at your convenience

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds engagement metrics to message output for channel posts, providing visibility into views, forwards, and reactions. The implementation follows existing code patterns and integrates cleanly with the message display functions.

Key Changes

  • Introduces get_engagement_info(message) helper function to extract and format engagement metrics
  • Updates get_messages and list_messages functions to include engagement data in output
  • Metrics are conditionally displayed only when available, maintaining clean output for messages without engagement data

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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