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 - #95
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
InboundThreadMessageDelivery: add rejectedAt (OffsetDateTime, 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
mvn -Dtest=InboundThreadsImplTest test passes
Get a thread with a reply to a suppressed address: that message's getDelivery().getRejectedAt() holds a timestamp
Summary by CodeRabbit
New Features
Inbound thread message delivery details now include a rejection timestamp when available. Messages that were not delivered can report this time, while delivered messages show no rejection timestamp.
No actionable comments were generated in the recent review.
Walkthrough
The inbound delivery model adds a rejectedAt timestamp mapped to rejected_at. The thread response fixture and tests cover a delivered message with no rejection timestamp and a not-delivered message with a rejection timestamp.
Changes: Inbound delivery response
Layer / File(s)
Summary
Rejection timestamp mapping and response coverage src/main/java/io/mailtrap/model/response/inbound/InboundThreadMessageDelivery.java, src/test/resources/api/inbound/getInboundThreadResponse.json, src/test/java/io/mailtrap/api/inbound/InboundThreadsImplTest.java
The delivery model maps rejected_at to rejectedAt. The fixture includes a not-delivered message with a rejection timestamp. Tests verify the message count, its status and timestamps, and a null rejection timestamp for a delivered message.
This adds a rejection timestamp to thread message delivery responses. It is a small additive change with test coverage, and no actionable merge risk remains.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "Add rejected_at to the thread message delivery" matches the main change: the PR adds a rejectedAt (rejected_at) field to InboundThreadMessageDelivery, and the test fixture and assertions co…
Description check
The description follows the template's Motivation, Changes, and How to test sections. Motivation explains that the Get a thread API now returns rejected_at for outbound messages and links the spec cha…
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 "Add rejected_at to the thread message delivery" matches the main change: the PR adds a rejectedAt (rejected_at) field to InboundThreadMessageDelivery, and the test fixture and assertions cover it. It is specific and names the affected object, so a teammate scanning history would understand the primary change.
Full details: Description check
Explanation
The description follows the template's Motivation, Changes, and How to test sections. Motivation explains that the Get a thread API now returns rejected_at for outbound messages and links the spec change. Changes lists the field addition and the test updates. How to test gives a Maven command and a manual check. The Images and GIFs section is absent, but it is not critical for this backend-only change. The How to test items are unchecked, which is normal before running them.
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
InboundThreadMessageDelivery: addrejectedAt(OffsetDateTime,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
mvn -Dtest=InboundThreadsImplTest testpassesgetDelivery().getRejectedAt()holds a timestampSummary by CodeRabbit