mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-07 06:20:39 +00:00
Implement socket/tcp for daemon command
This commit is contained in:
parent
7706a02e1b
commit
81a11dc977
19 changed files with 785 additions and 240 deletions
|
@ -13,7 +13,7 @@ public class JsonReceiveMessageHandler implements Manager.ReceiveMessageHandler
|
|||
|
||||
private final static Logger logger = LoggerFactory.getLogger(JsonReceiveMessageHandler.class);
|
||||
|
||||
protected final Manager m;
|
||||
private final Manager m;
|
||||
private final JsonWriter jsonWriter;
|
||||
|
||||
public JsonReceiveMessageHandler(Manager m, JsonWriter jsonWriter) {
|
||||
|
@ -24,6 +24,7 @@ public class JsonReceiveMessageHandler implements Manager.ReceiveMessageHandler
|
|||
@Override
|
||||
public void handleMessage(MessageEnvelope envelope, Throwable exception) {
|
||||
final var object = new HashMap<String, Object>();
|
||||
object.put("account", m.getSelfNumber());
|
||||
if (exception != null) {
|
||||
object.put("error", JsonError.from(exception));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue