From a4b9bc807e2ad0af472648d909e3c15373c9fbb9 Mon Sep 17 00:00:00 2001
From: Tainan Felipe <tainanfelipe214@gmail.com>
Date: Mon, 14 May 2018 16:34:06 -0300
Subject: [PATCH] add comment explaining reducer

---
 bigbluebutton-html5/imports/startup/client/auth.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/bigbluebutton-html5/imports/startup/client/auth.js b/bigbluebutton-html5/imports/startup/client/auth.js
index ffe3bfd490..df99ce72b2 100755
--- a/bigbluebutton-html5/imports/startup/client/auth.js
+++ b/bigbluebutton-html5/imports/startup/client/auth.js
@@ -35,6 +35,8 @@ export function joinRouteHandler(nextState, replace, callback) {
       const metakeys = metadata.length
         ? metadata.reduce((acc, meta) => {
           const key = Object.keys(meta).shift();
+          /* this reducer tranform array of objects in a sigle object and
+           force the metadata a be boolean value */
           return { ...acc, [key]: JSON.parse(meta[key]) };
         }) : {};
       SessionStorage.setItem(METADATA_KEY, metakeys);
-- 
GitLab