mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
parent
ed3992d993
commit
6feff1e42b
4 changed files with 28 additions and 1 deletions
|
@ -202,6 +202,15 @@ Depending on the type of the recipient(s) field this sends a reaction to one or
|
||||||
|
|
||||||
Exceptions: Failure, InvalidNumber
|
Exceptions: Failure, InvalidNumber
|
||||||
|
|
||||||
|
sendPaymentNotification(receipt<ay>, note<s>, recipient<s>) -> timestamp<x>::
|
||||||
|
* receipt : Byte array with the payment receipt blob
|
||||||
|
* note : String with a note for the payment
|
||||||
|
* recipient : String with the phone number of a single recipient
|
||||||
|
|
||||||
|
* timestamp : Long, can be used to identify the corresponding Signal reply
|
||||||
|
|
||||||
|
Exceptions: Failure
|
||||||
|
|
||||||
sendNoteToSelfMessage(message<s>, attachments<as>) -> timestamp<x>::
|
sendNoteToSelfMessage(message<s>, attachments<as>) -> timestamp<x>::
|
||||||
* message : Text to send (can be UTF8)
|
* message : Text to send (can be UTF8)
|
||||||
* attachments : String array of filenames to send as attachments (passed as filename, so need to be readable by the user signal-cli is running under)
|
* attachments : String array of filenames to send as attachments (passed as filename, so need to be readable by the user signal-cli is running under)
|
||||||
|
|
|
@ -62,6 +62,8 @@ public interface Signal extends DBusInterface {
|
||||||
String emoji, boolean remove, String targetAuthor, long targetSentTimestamp, List<String> recipients
|
String emoji, boolean remove, String targetAuthor, long targetSentTimestamp, List<String> recipients
|
||||||
) throws Error.InvalidNumber, Error.Failure;
|
) throws Error.InvalidNumber, Error.Failure;
|
||||||
|
|
||||||
|
long sendPaymentNotification(byte[] receipt, String note, String recipient) throws Error.Failure;
|
||||||
|
|
||||||
void sendContacts() throws Error.Failure;
|
void sendContacts() throws Error.Failure;
|
||||||
|
|
||||||
void sendSyncRequest() throws Error.Failure;
|
void sendSyncRequest() throws Error.Failure;
|
||||||
|
|
|
@ -388,7 +388,8 @@ public class DbusManagerImpl implements Manager {
|
||||||
public SendMessageResults sendPaymentNotificationMessage(
|
public SendMessageResults sendPaymentNotificationMessage(
|
||||||
final byte[] receipt, final String note, final RecipientIdentifier.Single recipient
|
final byte[] receipt, final String note, final RecipientIdentifier.Single recipient
|
||||||
) throws IOException {
|
) throws IOException {
|
||||||
throw new UnsupportedOperationException();
|
final var timestamp = signal.sendPaymentNotification(receipt, note, recipient.getIdentifier());
|
||||||
|
return new SendMessageResults(timestamp, Map.of());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -298,6 +298,21 @@ public class DbusSignalImpl implements Signal {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long sendPaymentNotification(
|
||||||
|
final byte[] receipt, final String note, final String recipient
|
||||||
|
) throws Error.Failure {
|
||||||
|
try {
|
||||||
|
final var results = m.sendPaymentNotificationMessage(receipt,
|
||||||
|
note,
|
||||||
|
getSingleRecipientIdentifier(recipient, m.getSelfNumber()));
|
||||||
|
checkSendMessageResults(results);
|
||||||
|
return results.timestamp();
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new Error.Failure(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendTyping(
|
public void sendTyping(
|
||||||
final String recipient, final boolean stop
|
final String recipient, final boolean stop
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue