Return message timestamp after sucessfully sending a message

Fixes #104
This commit is contained in:
AsamK 2020-04-03 14:02:18 +02:00
parent 320e126eeb
commit f51f0cbbcf
3 changed files with 17 additions and 12 deletions

View file

@ -99,12 +99,14 @@ public class SendCommand implements DbusCommand {
if (attachments == null) {
attachments = new ArrayList<>();
}
long timestamp;
if (ns.getString("group") != null) {
byte[] groupId = Util.decodeGroupId(ns.getString("group"));
signal.sendGroupMessage(messageText, attachments, groupId);
timestamp = signal.sendGroupMessage(messageText, attachments, groupId);
} else {
signal.sendMessage(messageText, attachments, ns.getList("recipient"));
timestamp = signal.sendMessage(messageText, attachments, ns.getList("recipient"));
}
System.out.println(timestamp);
return 0;
} catch (IOException e) {
handleIOException(e);