From eb1a089437b0f40f11567db85d505ebbc1bf3da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCrten?= Date: Wed, 24 Mar 2021 15:42:40 +0100 Subject: [PATCH] Revert changes to AbstractProtocolEngine This reverts parts of commit 5d143f8b33adc07d990627036b806a2becea7074. --- .../introduction/AbstractProtocolEngine.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/briar-core/src/main/java/org/briarproject/briar/introduction/AbstractProtocolEngine.java b/briar-core/src/main/java/org/briarproject/briar/introduction/AbstractProtocolEngine.java index 2c50d2d59..4760b25a4 100644 --- a/briar-core/src/main/java/org/briarproject/briar/introduction/AbstractProtocolEngine.java +++ b/briar-core/src/main/java/org/briarproject/briar/introduction/AbstractProtocolEngine.java @@ -127,17 +127,15 @@ abstract class AbstractProtocolEngine> Message m; ContactId c = getContactId(txn, s.getContactGroupId()); if (contactSupportsAutoDeletion(txn, c)) { - long timer = - autoDeleteManager.getAutoDeleteTimer(txn, c, timestamp); + long timer = autoDeleteManager.getAutoDeleteTimer(txn, c, + timestamp); m = messageEncoder.encodeAcceptMessage(s.getContactGroupId(), timestamp, s.getLastLocalMessageId(), s.getSessionId(), ephemeralPublicKey, acceptTimestamp, transportProperties, timer); sendMessage(txn, ACCEPT, s.getSessionId(), m, visible, timer); // Set the auto-delete timer duration on the message - // only if it is visible in our conversation. - // It will be sent with timer, so it destructs at introducee. - if (visible && timer != NO_AUTO_DELETE_TIMER) { + if (timer != NO_AUTO_DELETE_TIMER) { db.setCleanupTimerDuration(txn, m.getId(), timer); } } else { @@ -156,17 +154,15 @@ abstract class AbstractProtocolEngine> Message m; ContactId c = getContactId(txn, s.getContactGroupId()); if (contactSupportsAutoDeletion(txn, c)) { - long timer = - autoDeleteManager.getAutoDeleteTimer(txn, c, timestamp); + long timer = autoDeleteManager.getAutoDeleteTimer(txn, c, + timestamp); m = messageEncoder.encodeDeclineMessage(s.getContactGroupId(), timestamp, s.getLastLocalMessageId(), s.getSessionId(), timer); sendMessage(txn, DECLINE, s.getSessionId(), m, visible, timer, isAutoDecline); // Set the auto-delete timer duration on the local message - // only if it is visible in our conversation. - // It will be sent with timer, so it destructs at introducee. - if (visible && timer != NO_AUTO_DELETE_TIMER) { + if (timer != NO_AUTO_DELETE_TIMER) { db.setCleanupTimerDuration(txn, m.getId(), timer); } if (isAutoDecline) {