mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Revert changes to AbstractProtocolEngine
This reverts parts of commit 5d143f8b33adc07d990627036b806a2becea7074.
This commit is contained in:
committed by
Torsten Grote
parent
17fc81ab7a
commit
eb1a089437
@@ -127,17 +127,15 @@ abstract class AbstractProtocolEngine<S extends Session<?>>
|
||||
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<S extends Session<?>>
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user