mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-02 20:40:38 +00:00
Renaming dbus methods remoteGroupDelete -> sendGroupRemoteDeleteMessage, remoteDelete -> sendRemoteDeleteMessage
This commit is contained in:
parent
97d5465002
commit
43f24f9c6c
5 changed files with 16 additions and 16 deletions
|
@ -992,7 +992,7 @@ public class Manager implements Closeable {
|
|||
return sendSelfMessage(messageBuilder);
|
||||
}
|
||||
|
||||
public Pair<Long, List<SendMessageResult>> remoteDelete(
|
||||
public Pair<Long, List<SendMessageResult>> sendRemoteDeleteMessage(
|
||||
long targetSentTimestamp, List<String> recipients
|
||||
) throws IOException, InvalidNumberException {
|
||||
var delete = new SignalServiceDataMessage.RemoteDelete(targetSentTimestamp);
|
||||
|
@ -1000,7 +1000,7 @@ public class Manager implements Closeable {
|
|||
return sendMessage(messageBuilder, getSignalServiceAddresses(recipients));
|
||||
}
|
||||
|
||||
public Pair<Long, List<SendMessageResult>> remoteGroupDelete(
|
||||
public Pair<Long, List<SendMessageResult>> sendGroupRemoteDeleteMessage(
|
||||
long targetSentTimestamp, GroupId groupId
|
||||
) throws IOException, NotAGroupMemberException, GroupNotFoundException {
|
||||
var delete = new SignalServiceDataMessage.RemoteDelete(targetSentTimestamp);
|
||||
|
|
|
@ -149,15 +149,15 @@ Depending on the type of the recipient(s) field this sends a reaction to one or
|
|||
|
||||
Exceptions: Failure, InvalidNumber
|
||||
|
||||
remoteGroupDelete(targetSentTimestamp<x>, groupId<ay>) -> timestamp<x>::
|
||||
sendGroupRemoteDeleteMessage(targetSentTimestamp<x>, groupId<ay>) -> timestamp<x>::
|
||||
* targetSentTimestamp : Long representing timestamp of the message to delete
|
||||
* groupId : Byte array with base64 encoded group identifier
|
||||
* timestamp : Long, can be used to identify the corresponding signal reply
|
||||
|
||||
Exceptions: Failure, GroupNotFound
|
||||
|
||||
remoteDelete(targetSentTimestamp<x>, recipient<s>) -> timestamp<x>::
|
||||
remoteDelete(targetSentTimestamp<x>, recipients<as>) -> timestamp<x>::
|
||||
sendRemoteDeleteMessage(targetSentTimestamp<x>, recipient<s>) -> timestamp<x>::
|
||||
sendRemoteDeleteMessage(targetSentTimestamp<x>, recipients<as>) -> timestamp<x>::
|
||||
* targetSentTimestamp : Long representing timestamp of the message to delete
|
||||
* recipient : String with the phone number of a single recipient
|
||||
* recipients : Array of strings with phone numbers, should there be more recipients
|
||||
|
|
|
@ -21,15 +21,15 @@ public interface Signal extends DBusInterface {
|
|||
String message, List<String> attachments, List<String> recipients
|
||||
) throws Error.AttachmentInvalid, Error.Failure, Error.InvalidNumber, Error.UntrustedIdentity;
|
||||
|
||||
long remoteDelete(
|
||||
long sendRemoteDeleteMessage(
|
||||
long targetSentTimestamp, String recipient
|
||||
) throws Error.Failure, Error.InvalidNumber;
|
||||
|
||||
long remoteDelete(
|
||||
long sendRemoteDeleteMessage(
|
||||
long targetSentTimestamp, List<String> recipients
|
||||
) throws Error.Failure, Error.InvalidNumber;
|
||||
|
||||
long remoteGroupDelete(
|
||||
long sendGroupRemoteDeleteMessage(
|
||||
long targetSentTimestamp, byte[] groupId
|
||||
) throws Error.Failure, Error.GroupNotFound;
|
||||
|
||||
|
|
|
@ -61,9 +61,9 @@ public class RemoteDeleteCommand implements DbusCommand {
|
|||
try {
|
||||
long timestamp;
|
||||
if (groupId != null) {
|
||||
timestamp = signal.remoteGroupDelete(targetTimestamp, groupId);
|
||||
timestamp = signal.sendGroupRemoteDeleteMessage(targetTimestamp, groupId);
|
||||
} else {
|
||||
timestamp = signal.remoteDelete(targetTimestamp, recipients);
|
||||
timestamp = signal.sendRemoteDeleteMessage(targetTimestamp, recipients);
|
||||
}
|
||||
writer.println("{}", timestamp);
|
||||
} catch (AssertionError e) {
|
||||
|
|
|
@ -104,20 +104,20 @@ public class DbusSignalImpl implements Signal {
|
|||
}
|
||||
|
||||
@Override
|
||||
public long remoteDelete(
|
||||
public long sendRemoteDeleteMessage(
|
||||
final long targetSentTimestamp, final String recipient
|
||||
) {
|
||||
var recipients = new ArrayList<String>(1);
|
||||
recipients.add(recipient);
|
||||
return remoteDelete(targetSentTimestamp, recipients);
|
||||
return sendRemoteDeleteMessage(targetSentTimestamp, recipients);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long remoteDelete(
|
||||
public long sendRemoteDeleteMessage(
|
||||
final long targetSentTimestamp, final List<String> recipients
|
||||
) {
|
||||
try {
|
||||
final var results = m.remoteDelete(targetSentTimestamp, recipients);
|
||||
final var results = m.sendRemoteDeleteMessage(targetSentTimestamp, recipients);
|
||||
checkSendMessageResults(results.first(), results.second());
|
||||
return results.first();
|
||||
} catch (IOException e) {
|
||||
|
@ -128,11 +128,11 @@ public class DbusSignalImpl implements Signal {
|
|||
}
|
||||
|
||||
@Override
|
||||
public long remoteGroupDelete(
|
||||
public long sendGroupRemoteDeleteMessage(
|
||||
final long targetSentTimestamp, final byte[] groupId
|
||||
) {
|
||||
try {
|
||||
final var results = m.remoteGroupDelete(targetSentTimestamp, GroupId.unknownVersion(groupId));
|
||||
final var results = m.sendGroupRemoteDeleteMessage(targetSentTimestamp, GroupId.unknownVersion(groupId));
|
||||
checkSendMessageResults(results.first(), results.second());
|
||||
return results.first();
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue