From b386857d9927d405e30b272d63ea60b49cccd880 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 2 Aug 2018 20:48:35 +0000 Subject: [PATCH] choose any of the shared domains --- lib/extensions/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/extensions/index.js b/lib/extensions/index.js index 4ff13ff..653c0a0 100644 --- a/lib/extensions/index.js +++ b/lib/extensions/index.js @@ -456,7 +456,8 @@ module.exports.pairPin = function (opts) { console.log('[pairPin] generating offer'); var hri = require('human-readable-ids').hri; - var hrname = hri.random() + '.' + state.config.sharedDomain; + var i = Math.floor(Math.random() * state.config.sharedDomains.length); + var hrname = hri.random() + '.' + state.config.sharedDomains[i]; // TODO check used / unused names and ports var authzData = { id: auth.id