public ActionResult Chat(string accountName, string code, string auth) { var info = oAuthService.GetInfo(auth); Log.Info("Info received from auth: {0}", JsonConvert.SerializeObject(info)); switch (info.Accounts.Count(x => x.Product == "campfire")) { case 0: Log.Info("No Campfire accounts. Info received from auth: {0}", JsonConvert.SerializeObject(info)); return(View("NoCampfireAccounts")); default: ViewBag.Accounts = info.Accounts.Where(x => x.Product == "campfire").Select(GetAccountName); break; } ViewBag.Stealth = Convert.ToBoolean(ConfigurationManager.AppSettings["Stealth"] ?? "true") ? "true" : "false"; return(View("Chat")); }