mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Improve SignalServiceAddress handling
This commit is contained in:
parent
4ca3fe87f4
commit
6cfddc0aff
8 changed files with 101 additions and 60 deletions
|
@ -31,7 +31,7 @@ public class JsonDbusReceiveMessageHandler extends JsonReceiveMessageHandler {
|
|||
conn.sendSignal(new Signal.ReceiptReceived(
|
||||
objectPath,
|
||||
envelope.getTimestamp(),
|
||||
envelope.getSourceE164().get()
|
||||
!envelope.isUnidentifiedSender() && envelope.hasSource() ? envelope.getSourceE164().get() : content.getSender().getNumber().get()
|
||||
));
|
||||
} catch (DBusException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -55,7 +55,7 @@ public class JsonDbusReceiveMessageHandler extends JsonReceiveMessageHandler {
|
|||
conn.sendSignal(new Signal.MessageReceived(
|
||||
objectPath,
|
||||
message.getTimestamp(),
|
||||
envelope.isUnidentifiedSender() ? content.getSender().getNumber().get() : envelope.getSourceE164().get(),
|
||||
envelope.isUnidentifiedSender() || !envelope.hasSource() ? content.getSender().getNumber().get() : envelope.getSourceE164().get(),
|
||||
message.getGroupInfo().isPresent() ? message.getGroupInfo().get().getGroupId() : new byte[0],
|
||||
message.getBody().isPresent() ? message.getBody().get() : "",
|
||||
attachments));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue