You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add rejected_at to the thread message delivery - #270
The Get a thread API now returns rejected_at in the delivery object of sent (outbound) messages: the time a copy was rejected before sending, for example because the recipient is on the suppression list, and null otherwise. Spec change: mailtrap/mailtrap-openapi#75.
Changes
ThreadMessageDelivery: add RejectedAt (DateTimeOffset?, rejected_at), next to BouncedAt
Tests: RejectedAt is null on a delivered copy and parses the timestamp on a rejected one (new message in the thread fixture)
How to test
dotnet test tests/Mailtrap.IntegrationTests --filter "FullyQualifiedName~InboundThreads" passes
Get a thread with a reply to a suppressed address: that message's Delivery.RejectedAt holds a timestamp
Summary by CodeRabbit
New Features
Added a rejection timestamp to message delivery details, indicating when a message was rejected before sending.
Tests
Added coverage for rejected messages and verified that existing delivery and bounce timestamps remain unset where applicable.
No actionable comments were generated in the recent review.
Walkthrough
The thread delivery model adds a nullable rejection timestamp. The thread details integration test and response fixture cover a not-delivered message with a rejection timestamp.
ThreadMessageDelivery adds the nullable RejectedAt property, mapped to rejected_at.
Cover rejected message in thread details tests/Mailtrap.IntegrationTests/Inbound/InboundThreadsIntegrationTests.cs, tests/Mailtrap.IntegrationTests/Inbound/Threads/GetDetails_Success.json
The fixture adds a not-delivered message with a rejection timestamp. The test expects four messages and checks the rejection, delivered, and bounced timestamps.
This adds an optional RejectedAt timestamp to thread message delivery data, populated for messages rejected before sending (for example, a suppressed recipient). Existing consumers are unaffected because it is a nullable, additive field. No merge-blocking risk was identified.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: a new rejected_at field added to the thread message delivery model. It matches the ThreadMessageDelivery RejectedAt property and the related test fixture updates, so i…
Description check
The description follows the template's Motivation, Changes, and How to test sections. The motivation explains the API change and links the spec change. Changes lists the property and the test updates.…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: a new rejected_at field added to the thread message delivery model. It matches the ThreadMessageDelivery RejectedAt property and the related test fixture updates, so it is accurate and specific.
Full details: Description check
Explanation
The description follows the template's Motivation, Changes, and How to test sections. The motivation explains the API change and links the spec change. Changes lists the property and the test updates. How to test gives a test command and a manual scenario, but both items are unchecked and no test result is reported. The Images and GIFs section is omitted, which is acceptable for a non-visual API change.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
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
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.
Motivation
The Get a thread API now returns
rejected_atin thedeliveryobject of sent (outbound) messages: the time a copy was rejected before sending, for example because the recipient is on the suppression list, andnullotherwise. Spec change: mailtrap/mailtrap-openapi#75.Changes
ThreadMessageDelivery: addRejectedAt(DateTimeOffset?,rejected_at), next toBouncedAtRejectedAtis null on a delivered copy and parses the timestamp on a rejected one (new message in the thread fixture)How to test
dotnet test tests/Mailtrap.IntegrationTests --filter "FullyQualifiedName~InboundThreads"passesDelivery.RejectedAtholds a timestampSummary by CodeRabbit