fix tests

This commit is contained in:
Sorunome 2020-06-23 10:59:33 +02:00
parent 68fac1e112
commit f833511e38
No known key found for this signature in database
GPG key ID: B19471D07FC9BE9C
2 changed files with 3 additions and 3 deletions

View file

@ -275,7 +275,7 @@ class OlmManager {
plaintext = newSession.decrypt(type, body); plaintext = newSession.decrypt(type, body);
storeOlmSession(OlmSession( storeOlmSession(OlmSession(
key: client.userID, key: client.userID,
identityKey: identityKey, identityKey: senderKey,
sessionId: newSession.session_id(), sessionId: newSession.session_id(),
session: newSession, session: newSession,
lastReceived: DateTime.now(), lastReceived: DateTime.now(),
@ -383,7 +383,7 @@ class OlmManager {
identityKey: identityKey, identityKey: identityKey,
sessionId: session.session_id(), sessionId: session.session_id(),
session: session, session: session,
lastReceived: null, lastReceived: DateTime.fromMillisecondsSinceEpoch(0),
)); ));
} catch (e) { } catch (e) {
session.free(); session.free();

View file

@ -42,7 +42,7 @@ class OlmSession {
try { try {
session.unpickle(key, dbEntry.pickle); session.unpickle(key, dbEntry.pickle);
identityKey = dbEntry.identityKey; identityKey = dbEntry.identityKey;
sessionId = dbEntry.identityKey; sessionId = dbEntry.sessionId;
lastReceived = lastReceived =
dbEntry.lastReceived ?? DateTime.fromMillisecondsSinceEpoch(0); dbEntry.lastReceived ?? DateTime.fromMillisecondsSinceEpoch(0);
assert(sessionId == session.session_id()); assert(sessionId == session.session_id());