mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-20 15:44:20 +01:00
Synchronize plain text output of incoming messages
This commit is contained in:
@@ -25,6 +25,12 @@ public class ReceiveMessageHandler implements Manager.ReceiveMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handleMessage(MessageEnvelope envelope, Throwable exception) {
|
||||
synchronized (writer) {
|
||||
handleMessageInternal(envelope, exception);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleMessageInternal(MessageEnvelope envelope, Throwable exception) {
|
||||
var source = envelope.sourceAddress();
|
||||
writer.println("Envelope from: {} (device: {})",
|
||||
source.map(this::formatContact).orElse("unknown source"),
|
||||
|
||||
Reference in New Issue
Block a user