fix: always log media activity regardless of send result (by Wren) - #200
Merged
Conversation
Activity stream entries should always be recorded (like a finally block) so we can debug failures. Moved the log back before the throw and included sent/failed counts in the log content. Co-Authored-By: Wren <noreply@anthropic.com>
conoremclaughlin
added a commit
that referenced
this pull request
Mar 18, 2026
…und 2) Threads with >200 messages will anchor on message #200, not the true latest. Needs server-side 'latest message ID' support or descending order in get_thread_messages to fix properly. Documented as known limitation — 200+ message threads are extremely unlikely in practice. Co-Authored-By: Wren <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary\n\n- Activity stream logging for media sends should always fire (like a
finallyblock) so we can debug failures\n- MovedlogOutgoingTelegramback before the all-failed throw\n- Includedsent=N failed=Ncounts in the activity log content for at-a-glance debugging\n\nFollow-up to PR #199 based on Conor's feedback — the activity log is our debugging record and should capture all attempts, not just successes.\n\n## Test plan\n\n- [ ] Trigger a media send that fails — verify activity stream entry is created withfailed=1\n- [ ] Trigger a successful media send — verify activity stream entry showssent=1 failed=0\n\n🤖 Generated with Claude Code