mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 11:00:38 +00:00
Use record classes
This commit is contained in:
parent
ce70a623c2
commit
ce7aa580b6
66 changed files with 754 additions and 1877 deletions
|
@ -26,11 +26,11 @@ public class JsonReceiveMessageHandler implements Manager.ReceiveMessageHandler
|
|||
public void handleMessage(SignalServiceEnvelope envelope, SignalServiceContent content, Throwable exception) {
|
||||
final var object = new HashMap<String, Object>();
|
||||
if (exception != null) {
|
||||
object.put("error", new JsonError(exception));
|
||||
object.put("error", JsonError.from(exception));
|
||||
}
|
||||
|
||||
if (envelope != null) {
|
||||
object.put("envelope", new JsonMessageEnvelope(envelope, content, exception, m));
|
||||
object.put("envelope", JsonMessageEnvelope.from(envelope, content, exception, m));
|
||||
}
|
||||
|
||||
jsonWriter.write(object);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue