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);
storeOlmSession(OlmSession(
key: client.userID,
identityKey: identityKey,
identityKey: senderKey,
sessionId: newSession.session_id(),
session: newSession,
lastReceived: DateTime.now(),
@ -383,7 +383,7 @@ class OlmManager {
identityKey: identityKey,
sessionId: session.session_id(),
session: session,
lastReceived: null,
lastReceived: DateTime.fromMillisecondsSinceEpoch(0),
));
} catch (e) {
session.free();

View file

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