mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-11-29 08:55:48 +00:00
implement viewedReceipt
for Dbus and Json -- note that this changes the JsonReceiptMessage structure update documentation
This commit is contained in:
1 parent
26594dd0ee
commit
a9a6edaf3f
4 files changed
+28
-1
No files matched your search
@@ -212,13 +212,18 @@ sendTyping(recipient<s>, stop<b>) -> <>::
|
||||
|
||||
Exceptions: Failure, GroupNotFound, UntrustedIdentity
|
||||
|
||||
|
||||
sendReadReceipt(recipient<s>, targetSentTimestamp<ax>) -> <>::
|
||||
* recipient : Phone number of a single recipient
|
||||
* targetSentTimestamp : Array of Longs to identify the corresponding signal messages
|
||||
|
||||
Exceptions: Failure, UntrustedIdentity
|
||||
|
||||
sendViewedReceipt(recipient<s>, targetSentTimestamp<ax>) -> <>::
|
||||
* recipient : Phone number of a single recipient
|
||||
* targetSentTimestamp : Array of Longs to identify the corresponding signal messages
|
||||
|
||||
Exceptions: Failure, UntrustedIdentity
|
||||
|
||||
sendGroupMessageReaction(emoji<s>, remove<b>, targetAuthor<s>, targetSentTimestamp<x>, groupId<ay>) -> timestamp<x>::
|
||||
* emoji : Unicode grapheme cluster of the emoji
|
||||
* remove : Boolean, whether a previously sent reaction (emoji) should be removed
|
||||
|
||||
@@ -34,6 +34,10 @@ public interface Signal extends DBusInterface {
|
||||
String recipient, List<Long> messageIds
|
||||
) throws Error.Failure, Error.UntrustedIdentity;
|
||||
|
||||
void sendViewedReceipt(
|
||||
String recipient, List<Long> messageIds
|
||||
) throws Error.Failure, Error.UntrustedIdentity;
|
||||
|
||||
long sendRemoteDeleteMessage(
|
||||
long targetSentTimestamp, String recipient
|
||||
) throws Error.Failure, Error.InvalidNumber;
|
||||
|
||||
@@ -282,6 +282,19 @@ public class DbusSignalImpl implements Signal {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendViewedReceipt(
|
||||
final String recipient, final List<Long> messageIds
|
||||
) throws Error.Failure, Error.UntrustedIdentity {
|
||||
try {
|
||||
m.sendViewedReceipt(getSingleRecipientIdentifier(recipient, m.getSelfNumber()), messageIds);
|
||||
} catch (IOException e) {
|
||||
throw new Error.Failure(e.getMessage());
|
||||
} catch (UntrustedIdentityException e) {
|
||||
throw new Error.UntrustedIdentity(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendContacts() {
|
||||
try {
|
||||
|
||||
@@ -17,6 +17,9 @@ class JsonReceiptMessage {
|
||||
@JsonProperty
|
||||
final boolean isRead;
|
||||
|
||||
@JsonProperty
|
||||
final boolean isViewed;
|
||||
|
||||
@JsonProperty
|
||||
final List<Long> timestamps;
|
||||
|
||||
@@ -24,6 +27,7 @@ class JsonReceiptMessage {
|
||||
this.when = receiptMessage.getWhen();
|
||||
this.isDelivery = receiptMessage.isDeliveryReceipt();
|
||||
this.isRead = receiptMessage.isReadReceipt();
|
||||
this.isViewed = receiptMessage.isViewedReceipt();
|
||||
this.timestamps = receiptMessage.getTimestamps();
|
||||
}
|
||||
|
||||
@@ -33,6 +37,7 @@ class JsonReceiptMessage {
|
||||
this.when = when;
|
||||
this.isDelivery = isDelivery;
|
||||
this.isRead = isRead;
|
||||
this.isViewed = isViewed;
|
||||
this.timestamps = timestamps;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user