Find correct session state in case the same one is used twice.

The code made the assumption that a session state can be identified by
the unique session ID. However, when multiple identities from the same
device are involved, there are two sessions with the same ID running on
the device.

Hence, a second identifying criteria has to be used to uniquely identify
the correct session. Here, the ID of the group was chosen.
Unfortunately, the session state can not be cached easily anymore
leading to a small performance penalty when getting all messages for the
UI.
This commit is contained in:
Torsten Grote
2016-04-04 12:04:17 -03:00
parent 5ea7ff2857
commit 4b7a32a5ee
4 changed files with 51 additions and 34 deletions

View File

@@ -663,9 +663,9 @@ public class ConversationActivity extends BriarActivity
public void run() {
try {
if (accept) {
introductionManager.acceptIntroduction(sessionId);
introductionManager.acceptIntroduction(contactId, sessionId);
} else {
introductionManager.declineIntroduction(sessionId);
introductionManager.declineIntroduction(contactId, sessionId);
}
loadMessages();
} catch (DbException e) {