Page MenuHomePhabricator

D9870.id33186.diff
No OneTemporary

D9870.id33186.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
Thu, Dec 26, 7:42 AM (12 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2703142
Default Alt Text
D9870.id33186.diff (895 B)

Event Timeline