public ActionResult Chat(string name = "Guest", string contact = "All")
        {
            var user = GetOrRegisterUser(name);

            if (user == null)
            {
                return(View("Index"));
            }

            var contactUser = GetOrRegisterUser(contact);

            if (contactUser == null)
            {
                return(View("Index"));
            }

            var model = new Models.ChatModel()
            {
                User    = user,
                Contact = contactUser,
                History = ChatData.Instance.HistoryMessages.Where(m => IsMessageInHistory(m, name, contact)).ToList(),        // history for this user with the name 'name'
            };

            //return View(model);
            return(View("kek", model));
        }
Example #2
0
 public ChatViewModel(int chatId)
 {
     chat   = new Models.ChatModel();
     ChatId = chatId;
 }
Example #3
0
 public ChatViewModel(int chatId)
 {
     chat = new Models.ChatModel();
     ChatId = chatId;
 }
Example #4
0
 public ChatViewModel()
 {
     chat   = new Models.ChatModel();
     ChatId = -1;
 }
Example #5
0
 public ChatViewModel()
 {
     chat = new Models.ChatModel();
     ChatId = -1;
 }