Skip to content

telegram/message: exposed the DropAuthor flag for forwardMessage#1659

Merged
ernado merged 2 commits intogotd:mainfrom
zumoshi:main
Jan 1, 2026
Merged

telegram/message: exposed the DropAuthor flag for forwardMessage#1659
ernado merged 2 commits intogotd:mainfrom
zumoshi:main

Conversation

@zumoshi
Copy link
Contributor

@zumoshi zumoshi commented Jan 1, 2026

For this syntax

sender := message.NewSender(api)
sender.To(from).ForwardIDs(to, messageId).Send(ctx)

There was no way to set the DropAuthor flag to true due to the Send method directly creating the MessagesForwardMessagesRequest instance and passing it to Sender.forwardMessages immediately afterwards. Also Sender's methods are private.

This PR tries to enable replicating the Bot API's copyMessage method without having to do the whole process manually replicating existing logic/helpers.

@codecov
Copy link

codecov bot commented Jan 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.64%. Comparing base (fb1897b) to head (fdac586).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1659      +/-   ##
==========================================
- Coverage   68.90%   68.64%   -0.26%     
==========================================
  Files         446      446              
  Lines       18403    18407       +4     
==========================================
- Hits        12680    12636      -44     
- Misses       4784     4826      +42     
- Partials      939      945       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ernado ernado merged commit 0535561 into gotd:main Jan 1, 2026
14 checks passed
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.

2 participants