Page MenuHomePhabricator

D9870.diff
No OneTemporary

D9870.diff

diff --git a/keyserver/src/utils/olm-utils.js b/keyserver/src/utils/olm-utils.js
--- a/keyserver/src/utils/olm-utils.js
+++ b/keyserver/src/utils/olm-utils.js
@@ -47,7 +47,10 @@
const currentDate = new Date();
const lastPrekeyPublishDate = getLastPrekeyPublishTime(account);
- return currentDate - lastPrekeyPublishDate >= maxPublishedPrekeyAge;
+ return (
+ currentDate.getTime() - lastPrekeyPublishDate.getTime() >=
+ maxPublishedPrekeyAge
+ );
}
function shouldForgetPrekey(account: OlmAccount): boolean {
@@ -60,7 +63,9 @@
const currentDate = new Date();
const lastPrekeyPublishDate = getLastPrekeyPublishTime(account);
- return currentDate - lastPrekeyPublishDate >= maxOldPrekeyAge;
+ return (
+ currentDate.getTime() - lastPrekeyPublishDate.getTime() >= maxOldPrekeyAge
+ );
}
async function createPickledOlmAccount(): Promise<PickledOlmAccount> {

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 25, 8:50 PM (1 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2703142
Default Alt Text
D9870.diff (895 B)

Event Timeline