mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 11:00:38 +00:00
Improve SignalServiceAddress handling
This commit is contained in:
parent
4ca3fe87f4
commit
6cfddc0aff
8 changed files with 101 additions and 60 deletions
|
@ -17,10 +17,12 @@ class JsonMessageEnvelope {
|
|||
JsonReceiptMessage receiptMessage;
|
||||
|
||||
public JsonMessageEnvelope(SignalServiceEnvelope envelope, SignalServiceContent content) {
|
||||
SignalServiceAddress source = envelope.getSourceAddress();
|
||||
this.source = source.getNumber().get();
|
||||
if (!envelope.isUnidentifiedSender() && envelope.hasSource()) {
|
||||
SignalServiceAddress source = envelope.getSourceAddress();
|
||||
this.source = source.getNumber().get();
|
||||
this.relay = source.getRelay().isPresent() ? source.getRelay().get() : null;
|
||||
}
|
||||
this.sourceDevice = envelope.getSourceDevice();
|
||||
this.relay = source.getRelay().isPresent() ? source.getRelay().get() : null;
|
||||
this.timestamp = envelope.getTimestamp();
|
||||
this.isReceipt = envelope.isReceipt();
|
||||
if (content != null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue