mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
implement Dbus setExpirationTimer (#735)
implement method update documentation
This commit is contained in:
parent
8bee08fd96
commit
d47574351e
3 changed files with 18 additions and 0 deletions
|
@ -61,6 +61,13 @@ updateProfile(newName<s>, about <s>, aboutEmoji <s>, avatar<s>, remove<b>) -> <>
|
||||||
|
|
||||||
Exceptions: Failure
|
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.
|
||||||
|
|
||||||
|
Exceptions: Failure
|
||||||
|
|
||||||
setContactBlocked(number<s>, block<b>) -> <>::
|
setContactBlocked(number<s>, block<b>) -> <>::
|
||||||
* number : Phone number affected by method
|
* number : Phone number affected by method
|
||||||
* block : 0=remove block , 1=blocked
|
* block : 0=remove block , 1=blocked
|
||||||
|
|
|
@ -71,6 +71,8 @@ public interface Signal extends DBusInterface {
|
||||||
|
|
||||||
void setContactName(String number, String name) throws Error.InvalidNumber;
|
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 setContactBlocked(String number, boolean blocked) throws Error.InvalidNumber;
|
||||||
|
|
||||||
void setGroupBlocked(byte[] groupId, boolean blocked) throws Error.GroupNotFound, Error.InvalidGroupId;
|
void setGroupBlocked(byte[] groupId, boolean blocked) throws Error.GroupNotFound, Error.InvalidGroupId;
|
||||||
|
|
|
@ -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
|
@Override
|
||||||
public void setContactBlocked(final String number, final boolean blocked) {
|
public void setContactBlocked(final String number, final boolean blocked) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue