mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 11:00:38 +00:00
Improve receiving unidentified messages
This commit is contained in:
parent
90b752b912
commit
8ad9c9b0ff
2 changed files with 8 additions and 13 deletions
|
@ -20,14 +20,14 @@ class JsonMessageEnvelope {
|
|||
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.relay = source.getRelay().isPresent() ? source.getRelay().get() : null;
|
||||
this.timestamp = envelope.getTimestamp();
|
||||
this.isReceipt = envelope.isReceipt();
|
||||
if (content != null) {
|
||||
if (envelope.isUnidentifiedSender()) {
|
||||
this.source = content.getSender();
|
||||
this.sourceDevice = content.getSenderDevice();
|
||||
}
|
||||
if (content.getDataMessage().isPresent()) {
|
||||
this.dataMessage = new JsonDataMessage(content.getDataMessage().get());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue