Repository navigation
|
The timestamp field for remoteDelete and adminDelete differ: |
Replies: 2 comments 4 replies
|
This is an inconsistency in signal-cli's own output layer, not in the Signal protocol. In the JSON output, JsonRemoteDelete carries the field as "timestamp" while JsonAdminDelete carries the equivalent value as "targetSentTimestamp". Both refer to the same thing: the timestamp of the message being deleted, so the difference is purely a naming choice made in signal-cli, and it is fixable there if you want them aligned. BTW, The same split appears in the dbus output: DbusReceiveMessageHandler emits remoteDelete as a map with key "timestamp" but adminDelete as "targetSentTimestamp", so whichever interface you consume, the two delete types disagree on the field name. If you are filing this, the ask is to make JsonRemoteDelete use targetSentTimestamp (or make JsonAdminDelete use timestamp); the places to change are src/main/java/org/asamk/signal/json/JsonRemoteDelete.java and JsonAdminDelete.java, plus the dbus handler for consistency. |
|
I'd create PR but still not sure if it is OK, because renaming a JSON field is a breaking API change... Let them review it. Anyway, I hope I have answered your question :) |
Renaming the field will have to wait for the next major version.
You could however create a PR that adds a new field and keeps the old field marked as a deprecated fallback. Then the old parameter can be removed whenever the next major version is released.
I guess
targetTimestampwould be a good name to match the cli parameter.