Repository navigation
Add --timestamp option to send command - #2147
Merged
Merged
Conversation
Let the caller choose the timestamp of a sent message instead of using the current time. Signal clients identify a message by its author and timestamp, so this lets a caller know the timestamp before the send returns, or reuse the timestamp of an earlier attempt. The value must be positive and strictly in the past. A supplied timestamp does not update the last generated timestamp, so a value equal to the current time could be the same as the one generated for a concurrent send. The option is rejected together with --edit-timestamp or --end-session, and over D-Bus, which has no way to pass it. Closes AsamK#1390 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AsamK
approved these changes
Nov 7, 2026
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.
Closes #1390.
Adds an optional
--timestamptosend(and atimestampparam over JSON-RPC), so the caller can choose the message timestamp instead of having signal-cli generate one. Signal clients identify a message by its author and timestamp, so this lets a caller know the timestamp before the send returns, or reuse the timestamp of an earlier attempt.Behaviour
lastMessageTimestamp), so a value equal to the current time could be the same as the one generated for a concurrent send.--edit-timestampor--end-session, and over D-Bus, whose interface has no field for it. In the library,Messagegets an optionaltimestamp, andsendEditMessagerejects a message that has one.sendgets the option. Other sending commands (reactions, remote delete, polls, pins, stories, β¦) keep generating their own timestamp.Usage
{"jsonrpc":"2.0","method":"send","params":{"recipient":["+491234567890"],"message":"hello","timestamp":1760000000000},"id":1}Tests
SendCommandParsingTest(12 new tests): the value reaching the sentMessagefrom the CLI and from JSON-RPC (asLongandInteger), omitted value unchanged, zero, negative, future and non-integer values rejected, the--edit-timestamp/--end-sessionrejections, and the bounds ofparseMessageTimestamp(null, just before now, equal to now,BigInteger/Double/String)../gradlew buildpasses (:test72 tests,:libsignal-cli:test171 tests, 0 failures).π€ Generated with Claude Code
https://claude.ai/code/session_014BxcotxHKb9ZNJkezZgmnQ