Exceptions: InvalidNumber, Failure
+deleteContact(number<s>) -> <>::
+* number : Phone number
+
+Exceptions: Failure
+
+deleteRecipient(number<s>) -> <>::
+* number : Phone number
+
+Exceptions: Failure
+
setExpirationTimer(number<s>, expiration<i>) -> <>::
* number : Phone number of recipient
* expiration : int32 for the number of seconds before messages to this recipient disappear. Set to 0 to disable expiration.
void sendEndSessionMessage(List<String> recipients) throws Error.Failure, Error.InvalidNumber, Error.UntrustedIdentity;
+ void deleteRecipient(final String recipient) throws Error.Failure;
+
+ void deleteContact(final String recipient) throws Error.Failure;
+
long sendGroupMessage(
String message, List<String> attachments, byte[] groupId
) throws Error.GroupNotFound, Error.Failure, Error.AttachmentInvalid, Error.InvalidGroupId;
@Override
public void deleteRecipient(final RecipientIdentifier.Single recipient) throws IOException {
- throw new UnsupportedOperationException();
+ signal.deleteRecipient(recipient.getIdentifier());
}
@Override
public void deleteContact(final RecipientIdentifier.Single recipient) throws IOException {
- throw new UnsupportedOperationException();
+ signal.deleteContact(recipient.getIdentifier());
}
@Override
}
}
+ @Override
+ public void deleteRecipient(final String recipient) throws Error.Failure {
+ try {
+ m.deleteRecipient(getSingleRecipientIdentifier(recipient, m.getSelfNumber()));
+ } catch (IOException e) {
+ throw new Error.Failure("Recipient not found");
+ }
+ }
+
+ @Override
+ public void deleteContact(final String recipient) throws Error.Failure {
+ try {
+ m.deleteContact(getSingleRecipientIdentifier(recipient, m.getSelfNumber()));
+ } catch (IOException e) {
+ throw new Error.Failure("Contact not found");
+ }
+ }
+
@Override
public long sendGroupMessage(final String message, final List<String> attachments, final byte[] groupId) {
try {