Don't show remote introduction responses after declining locally

Fixes #1514
This commit is contained in:
Torsten Grote
2019-03-26 14:35:19 -03:00
parent bc8bb08853
commit f9dfbe3fa5
2 changed files with 3 additions and 14 deletions

View File

@@ -381,17 +381,6 @@ class IntroduceeProtocolEngine
if (isInvalidDependency(s, m.getPreviousMessageId()))
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
return IntroduceeSession.clear(s, START, s.getLastLocalMessageId(),
s.getLocalTimestamp(), m.getMessageId());

View File

@@ -399,7 +399,7 @@ public class IntroductionIntegrationTest
assertEquals(3, messages.size());
messages = db2.transactionWithResult(true, txn ->
introductionManager2.getMessageHeaders(txn, contactId0From2));
assertEquals(3, messages.size());
assertEquals(2, messages.size());
assertFalse(listener0.aborted);
assertFalse(listener1.aborted);
assertFalse(listener2.aborted);
@@ -553,10 +553,10 @@ public class IntroductionIntegrationTest
introductionManager0.getMessageHeaders(txn, contactId2From0))
.size());
assertGroupCount(messageTracker0, g2.getId(), 2, 1);
assertEquals(3, db1.transactionWithResult(true, txn ->
assertEquals(2, db1.transactionWithResult(true, txn ->
introductionManager1.getMessageHeaders(txn, contactId0From1))
.size());
assertGroupCount(messageTracker1, g1.getId(), 3, 2);
assertGroupCount(messageTracker1, g1.getId(), 2, 1);
assertEquals(3, db2.transactionWithResult(true, txn ->
introductionManager2.getMessageHeaders(txn, contactId0From2))
.size());