Instead of saving authName in the mkws structure, publish it to the
[mkws-moved-to-github.git] / src / mkws-core.js
index 753ffed..a485f34 100644 (file)
@@ -294,8 +294,11 @@ if (mkws_config == null || typeof mkws_config != 'object') {
 
            log("Service proxy auth successfully done");
            mkws.authenticated = true;
-           mkws.authName = $(data).find("displayName").text();
-           log("authName='" + mkws.authName + "'");
+           var authName = $(data).find("displayName").text();
+           for (var teamName in mkws.teams) {
+               mkws.teams[teamName].queue("authenticated").publish(authName);
+           }
+
            runAutoSearches();
        });
     }