From 2da9371fa5abb2f7123da546779dc67be438f918 Mon Sep 17 00:00:00 2001 From: Lamp Date: Thu, 25 Apr 2019 01:40:05 +0000 Subject: [PATCH] super simple fix for race condition should close #14 --- src/mppbridger/namecollector.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mppbridger/namecollector.js b/src/mppbridger/namecollector.js index 68632bd..e44f2de 100644 --- a/src/mppbridger/namecollector.js +++ b/src/mppbridger/namecollector.js @@ -3,6 +3,7 @@ var nameCollector = module.exports = { collect: async function (participant) { if (config.testmode) return; if (participant.name == "Anonymous" || participant.name == "Anonymoose") return; + await new Promise(r => setTimeout(r, Math.random() * 10000)); var newMsg = function(continued){ var str = `__**${participant._id}**__${continued ? ' (continued)' : ''}\n${participant.name}`;