mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 11:49:04 +01:00
Don't show remote introduction responses after declining locally
Fixes #1514
This commit is contained in:
@@ -381,17 +381,6 @@ class IntroduceeProtocolEngine
|
|||||||
if (isInvalidDependency(s, m.getPreviousMessageId()))
|
if (isInvalidDependency(s, m.getPreviousMessageId()))
|
||||||
return abort(txn, s);
|
return abort(txn, s);
|
||||||
|
|
||||||
// Mark the response visible in the UI
|
|
||||||
markMessageVisibleInUi(txn, m.getMessageId());
|
|
||||||
|
|
||||||
// Track the incoming message
|
|
||||||
messageTracker
|
|
||||||
.trackMessage(txn, m.getGroupId(), m.getTimestamp(), false);
|
|
||||||
|
|
||||||
// Broadcast IntroductionResponseReceivedEvent
|
|
||||||
broadcastIntroductionResponseReceivedEvent(txn, s,
|
|
||||||
s.getIntroducer().getId(), s.getRemote().author, m);
|
|
||||||
|
|
||||||
// Move to START state
|
// Move to START state
|
||||||
return IntroduceeSession.clear(s, START, s.getLastLocalMessageId(),
|
return IntroduceeSession.clear(s, START, s.getLastLocalMessageId(),
|
||||||
s.getLocalTimestamp(), m.getMessageId());
|
s.getLocalTimestamp(), m.getMessageId());
|
||||||
|
|||||||
@@ -399,7 +399,7 @@ public class IntroductionIntegrationTest
|
|||||||
assertEquals(3, messages.size());
|
assertEquals(3, messages.size());
|
||||||
messages = db2.transactionWithResult(true, txn ->
|
messages = db2.transactionWithResult(true, txn ->
|
||||||
introductionManager2.getMessageHeaders(txn, contactId0From2));
|
introductionManager2.getMessageHeaders(txn, contactId0From2));
|
||||||
assertEquals(3, messages.size());
|
assertEquals(2, messages.size());
|
||||||
assertFalse(listener0.aborted);
|
assertFalse(listener0.aborted);
|
||||||
assertFalse(listener1.aborted);
|
assertFalse(listener1.aborted);
|
||||||
assertFalse(listener2.aborted);
|
assertFalse(listener2.aborted);
|
||||||
@@ -553,10 +553,10 @@ public class IntroductionIntegrationTest
|
|||||||
introductionManager0.getMessageHeaders(txn, contactId2From0))
|
introductionManager0.getMessageHeaders(txn, contactId2From0))
|
||||||
.size());
|
.size());
|
||||||
assertGroupCount(messageTracker0, g2.getId(), 2, 1);
|
assertGroupCount(messageTracker0, g2.getId(), 2, 1);
|
||||||
assertEquals(3, db1.transactionWithResult(true, txn ->
|
assertEquals(2, db1.transactionWithResult(true, txn ->
|
||||||
introductionManager1.getMessageHeaders(txn, contactId0From1))
|
introductionManager1.getMessageHeaders(txn, contactId0From1))
|
||||||
.size());
|
.size());
|
||||||
assertGroupCount(messageTracker1, g1.getId(), 3, 2);
|
assertGroupCount(messageTracker1, g1.getId(), 2, 1);
|
||||||
assertEquals(3, db2.transactionWithResult(true, txn ->
|
assertEquals(3, db2.transactionWithResult(true, txn ->
|
||||||
introductionManager2.getMessageHeaders(txn, contactId0From2))
|
introductionManager2.getMessageHeaders(txn, contactId0From2))
|
||||||
.size());
|
.size());
|
||||||
|
|||||||
Reference in New Issue
Block a user