Repository navigation
Keep one resent tag when resending a resend - #34
Merged
Merged
Conversation
Each resend copied the source's tags, including its "resent" tag, then added another, so a chain of resends showed "resent resent ...". Copied tags are now deduplicated; resent_from_id still records depth. Fixes #16
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.
Fixes #16.
A resend copied every tag from the message it replayed, then added
resent. When you resend a resend, the copied tags already includeresent, so a chain of resends storedresent, thenresent resent, and so on.The copied tags and
resentare now deduplicated together, so every resend storesresentexactly once. The resend chain's depth is still inresent_from_id(resendChain()), so nothing is lost. The dedupe also drops a tag that appeared twice on the original.Test: a resend of a resend of a message tagged
receipt, receiptnow stores['receipt', 'resent']. Before the fix it stored['receipt', 'receipt', 'resent', 'resent'].All 453 tests pass, and static analysis is clean.
There's no UI code change; the dashboard's tag badges just stop repeating. #33 (the fix for #31) edits another part of the same file, so the two branches should merge cleanly in either order.