From d74a2af4d33821cba233285df1731759d16aa358 Mon Sep 17 00:00:00 2001 From: Daniel Huigens Date: Fri, 14 Dec 2018 16:38:49 +0100 Subject: [PATCH] Return primary key expiry based on userId param in getExpirationTime --- src/key.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/key.js b/src/key.js index d8ce9a84..96dd8106 100644 --- a/src/key.js +++ b/src/key.js @@ -501,7 +501,7 @@ Key.prototype.verifyPrimaryKey = async function(date=new Date(), userId={}) { * @async */ Key.prototype.getExpirationTime = async function(capabilities, keyId, userId) { - const primaryUser = await this.getPrimaryUser(null); + const primaryUser = await this.getPrimaryUser(null, userId); if (!primaryUser) { throw new Error('Could not find primary user'); }