mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 05:39:53 +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;
|
Message m;
|
||||||
ContactId c = getContactId(txn, s.getContactGroupId());
|
ContactId c = getContactId(txn, s.getContactGroupId());
|
||||||
if (contactSupportsAutoDeletion(txn, c)) {
|
if (contactSupportsAutoDeletion(txn, c)) {
|
||||||
long timer =
|
long timer = autoDeleteManager.getAutoDeleteTimer(txn, c,
|
||||||
autoDeleteManager.getAutoDeleteTimer(txn, c, timestamp);
|
timestamp);
|
||||||
m = messageEncoder.encodeAcceptMessage(s.getContactGroupId(),
|
m = messageEncoder.encodeAcceptMessage(s.getContactGroupId(),
|
||||||
timestamp, s.getLastLocalMessageId(), s.getSessionId(),
|
timestamp, s.getLastLocalMessageId(), s.getSessionId(),
|
||||||
ephemeralPublicKey, acceptTimestamp, transportProperties,
|
ephemeralPublicKey, acceptTimestamp, transportProperties,
|
||||||
timer);
|
timer);
|
||||||
sendMessage(txn, ACCEPT, s.getSessionId(), m, visible, timer);
|
sendMessage(txn, ACCEPT, s.getSessionId(), m, visible, timer);
|
||||||
// Set the auto-delete timer duration on the message
|
// Set the auto-delete timer duration on the message
|
||||||
// only if it is visible in our conversation.
|
if (timer != NO_AUTO_DELETE_TIMER) {
|
||||||
// It will be sent with timer, so it destructs at introducee.
|
|
||||||
if (visible && timer != NO_AUTO_DELETE_TIMER) {
|
|
||||||
db.setCleanupTimerDuration(txn, m.getId(), timer);
|
db.setCleanupTimerDuration(txn, m.getId(), timer);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -156,17 +154,15 @@ abstract class AbstractProtocolEngine<S extends Session<?>>
|
|||||||
Message m;
|
Message m;
|
||||||
ContactId c = getContactId(txn, s.getContactGroupId());
|
ContactId c = getContactId(txn, s.getContactGroupId());
|
||||||
if (contactSupportsAutoDeletion(txn, c)) {
|
if (contactSupportsAutoDeletion(txn, c)) {
|
||||||
long timer =
|
long timer = autoDeleteManager.getAutoDeleteTimer(txn, c,
|
||||||
autoDeleteManager.getAutoDeleteTimer(txn, c, timestamp);
|
timestamp);
|
||||||
m = messageEncoder.encodeDeclineMessage(s.getContactGroupId(),
|
m = messageEncoder.encodeDeclineMessage(s.getContactGroupId(),
|
||||||
timestamp, s.getLastLocalMessageId(), s.getSessionId(),
|
timestamp, s.getLastLocalMessageId(), s.getSessionId(),
|
||||||
timer);
|
timer);
|
||||||
sendMessage(txn, DECLINE, s.getSessionId(), m, visible, timer,
|
sendMessage(txn, DECLINE, s.getSessionId(), m, visible, timer,
|
||||||
isAutoDecline);
|
isAutoDecline);
|
||||||
// Set the auto-delete timer duration on the local message
|
// Set the auto-delete timer duration on the local message
|
||||||
// only if it is visible in our conversation.
|
if (timer != NO_AUTO_DELETE_TIMER) {
|
||||||
// It will be sent with timer, so it destructs at introducee.
|
|
||||||
if (visible && timer != NO_AUTO_DELETE_TIMER) {
|
|
||||||
db.setCleanupTimerDuration(txn, m.getId(), timer);
|
db.setCleanupTimerDuration(txn, m.getId(), timer);
|
||||||
}
|
}
|
||||||
if (isAutoDecline) {
|
if (isAutoDecline) {
|
||||||
|
|||||||
Reference in New Issue
Block a user