Do not track incoming positive introduction responses

because they are not shown in the UI and are therefore not marked as
read. This fixes the unread message count.
This commit is contained in:
Torsten Grote
2016-11-17 09:44:44 -02:00
parent 37e61c97ea
commit 593152e7cd
2 changed files with 16 additions and 6 deletions

View File

@@ -237,15 +237,17 @@ class IntroductionManagerImpl extends ConversationClientImpl
try {
if (role == ROLE_INTRODUCER) {
introducerManager.incomingMessage(txn, state, message);
if (type == TYPE_RESPONSE)
messageTracker.trackIncomingMessage(txn, m);
} else if (role == ROLE_INTRODUCEE) {
introduceeManager.incomingMessage(txn, state, message);
if (type == TYPE_RESPONSE && !message.getBoolean(ACCEPT))
messageTracker.trackIncomingMessage(txn, m);
} else {
if (LOG.isLoggable(WARNING))
LOG.warning("Unknown role '" + role + "'");
throw new DbException();
}
if (type == TYPE_RESPONSE)
messageTracker.trackIncomingMessage(txn, m);
} catch (DbException e) {
if (LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);
if (role == ROLE_INTRODUCER) introducerManager.abort(txn, state);