implement Dbus setExpirationTimer (#735)

implement method

update documentation
This commit is contained in:
John Freed 2021-09-26 09:04:40 +02:00 committed by GitHub
parent 8bee08fd96
commit d47574351e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 0 deletions

View file

@ -71,6 +71,8 @@ public interface Signal extends DBusInterface {
void setContactName(String number, String name) throws Error.InvalidNumber;
void setExpirationTimer(final String number, final int expiration) throws Error.Failure;
void setContactBlocked(String number, boolean blocked) throws Error.InvalidNumber;
void setGroupBlocked(byte[] groupId, boolean blocked) throws Error.GroupNotFound, Error.InvalidGroupId;

View file

@ -305,6 +305,15 @@ public class DbusSignalImpl implements Signal {
}
}
@Override
public void setExpirationTimer(final String number, final int expiration) {
try {
m.setExpirationTimer(getSingleRecipientIdentifier(number, m.getUsername()), expiration);
} catch (IOException e) {
throw new Error.Failure(e.getMessage());
}
}
@Override
public void setContactBlocked(final String number, final boolean blocked) {
try {