public JsonResult SendMessage(SendMessageModel msg) { try { msg.Message = msg.Message.Length > WebChat.Common.Common.MaxLength_Message ? msg.Message.Substring(0, 500) : msg.Message; //Limitamos el mensaje del cliente a 500 caracteres EpironChatBC.InsertMessage(msg.RoomId, msg.UserId, msg.Message, msg.RecordId); return(Json(new { Result = "OK" })); } catch (Exception ex) { Helper.Log(ex.Message); return(Json(new { Result = "ERROR", Message = Fwk.Exceptions.ExceptionHelper.GetAllMessageException(ex) })); } }