Use correct sender device for receiving sealed messages

This commit is contained in:
AsamK 2019-11-11 19:34:31 +01:00
parent 50b6174dd6
commit 90b752b912
2 changed files with 5 additions and 2 deletions

View file

@ -19,10 +19,11 @@ class JsonMessageEnvelope {
public JsonMessageEnvelope(SignalServiceEnvelope envelope, SignalServiceContent content) {
SignalServiceAddress source = envelope.getSourceAddress();
this.source = source.getNumber();
this.sourceDevice = envelope.getSourceDevice();
if (this.source.equals("")) {
this.source = content.getSender();
this.sourceDevice = content.getSenderDevice();
}
this.sourceDevice = envelope.getSourceDevice();
this.relay = source.getRelay().isPresent() ? source.getRelay().get() : null;
this.timestamp = envelope.getTimestamp();
this.isReceipt = envelope.isReceipt();