fix tests
This commit is contained in:
parent
68fac1e112
commit
f833511e38
|
@ -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();
|
||||||
|
|
|
@ -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());
|
||||||
|
|
Loading…
Reference in a new issue