signalapp / libsignal-service-java

A Java/Android library for communicating with the Signal messaging service.
GNU General Public License v3.0
587 stars 271 forks source link

Use correct timestamp in Note to self envelopes #68

Closed AsamK closed 5 years ago

AsamK commented 5 years ago

When sending a SentTranscript sync message manually (as done for note to self messages), the timestamp of the envelope is set to the current time instead of the transcript message's timestamp.

This causes these sent message to be rejected when received by libsignal-service-java:

org.whispersystems.libsignal.InvalidMessageException:
Timestamps don't match: 1553373769631 vs 1553373769692 (ProtocolInvalidMessageException)

It looks like Signal-Desktop doesn't do this validation (which is probably a bug by itself), so the timestamp mismatch can't be observed when sending messages from Signal-Android to Signal-Desktop. The issue is only noticable when an application using libsignal-service-java is linked to another one using libsignal-service-java.

Noticed here: AsamK/signal-cli#196

matthew-piziak commented 5 years ago

Bump. Can a maintainer somebody please review and merge this pull request? This bug makes it impossible to send notes from phone to desktop via Signal.

matthew-piziak commented 5 years ago

@moxie-signal Perhaps you can take a look?

minnmann commented 5 years ago

This appears to be fixed by https://github.com/signalapp/libsignal-service-java/commit/1aebce8d6eff330898098086fb56b001579fef7a

AsamK commented 5 years ago

indeed, looks like it's the same change, but with different formatting.