Ejemplo n.º 1
0
 public ActionResult StartRoom()
 {
     ChatUserModel user = CurrentUser;
     WebChat WC = new WebChat() { CurrentUser = user };
     if (user != null)
     {
         MongoDBConnector.SetUserLastActionTime(user.UserName, DateTime.UtcNow);
         if (!user.IsAdmin)
             WC.AllChats = WC.AllChats.Where(c => c.AllowedUser.Contains(user.UserName)).ToList();
         return View(WC);
     }
     else
         return RedirectToAction("ErrorPage", "Home", ErrorModel.LoginOrRegistration);
 }
Ejemplo n.º 2
0
 public ActionResult GetCurrentState()
 {
     WebChat wc = new WebChat() { CurrentUser = CurrentUser };
     return PartialView(wc);
 }