mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Return message timestamp after sucessfully sending a message
Fixes #104
This commit is contained in:
parent
320e126eeb
commit
f51f0cbbcf
3 changed files with 17 additions and 12 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue