mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Show source deviceId and relay, when receiving messages
This commit is contained in:
parent
900b648f09
commit
cc0177da10
1 changed files with 6 additions and 1 deletions
|
@ -28,6 +28,7 @@ import org.freedesktop.dbus.exceptions.DBusExecutionException;
|
|||
import org.whispersystems.signalservice.api.crypto.UntrustedIdentityException;
|
||||
import org.whispersystems.signalservice.api.messages.*;
|
||||
import org.whispersystems.signalservice.api.messages.multidevice.SignalServiceSyncMessage;
|
||||
import org.whispersystems.signalservice.api.push.SignalServiceAddress;
|
||||
import org.whispersystems.signalservice.api.push.exceptions.EncapsulatedExceptions;
|
||||
import org.whispersystems.signalservice.api.push.exceptions.NetworkFailureException;
|
||||
import org.whispersystems.signalservice.api.push.exceptions.UnregisteredUserException;
|
||||
|
@ -493,7 +494,11 @@ public class Main {
|
|||
|
||||
@Override
|
||||
public void handleMessage(SignalServiceEnvelope envelope, SignalServiceContent content, GroupInfo group) {
|
||||
System.out.println("Envelope from: " + envelope.getSource());
|
||||
SignalServiceAddress source = envelope.getSourceAddress();
|
||||
System.out.println(String.format("Envelope from: %s (device: %d)", source.getNumber(), envelope.getSourceDevice()));
|
||||
if (source.getRelay().isPresent()) {
|
||||
System.out.println("Relayed by: " + source.getRelay().get());
|
||||
}
|
||||
System.out.println("Timestamp: " + envelope.getTimestamp());
|
||||
|
||||
if (envelope.isReceipt()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue