mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Add option to send read receipts for all received data messages
Fixes #850
This commit is contained in:
parent
fd92a96e1a
commit
27dbc671e0
7 changed files with 30 additions and 6 deletions
|
@ -1,3 +1,3 @@
|
|||
package org.asamk.signal.manager.api;
|
||||
|
||||
public record ReceiveConfig(boolean ignoreAttachments) {}
|
||||
public record ReceiveConfig(boolean ignoreAttachments, boolean sendReadReceipts) {}
|
||||
|
|
|
@ -260,6 +260,11 @@ public final class IncomingMessageHandler {
|
|||
actions.add(new SendProfileKeyAction(sender));
|
||||
}
|
||||
}
|
||||
if (receiveConfig.sendReadReceipts()) {
|
||||
actions.add(new SendReceiptAction(sender,
|
||||
SignalServiceReceiptMessage.Type.READ,
|
||||
message.getTimestamp()));
|
||||
}
|
||||
|
||||
actions.addAll(handleSignalServiceDataMessage(message,
|
||||
false,
|
||||
|
|
|
@ -35,7 +35,7 @@ public class ReceiveHelper {
|
|||
private final SignalDependencies dependencies;
|
||||
private final Context context;
|
||||
|
||||
private ReceiveConfig receiveConfig = new ReceiveConfig(false);
|
||||
private ReceiveConfig receiveConfig = new ReceiveConfig(false, false);
|
||||
private boolean needsToRetryFailedMessages = false;
|
||||
private boolean hasCaughtUpWithOldMessages = false;
|
||||
private boolean isWaitingForMessage = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue