//TODO: INSERT INTO DATABASE
 public void Insert(WebimHistory h)
 {
     return;
 }
        private WebimHistory Mapping(HistoryEntity e)
        {
            WebimHistory h = new WebimHistory();
            h.Type = e.Type;
            h.Send = e.Send;
             h.To = e.ToUser;
             h.From = e.FromUser;
            h.Nick = e.Nick;
            h.Body = e.Body;
            h.Style = e.Style;
            h.Timestamp = e.Timestamp;

            return h;
        }
 public void InsertHistory(long uid, string offline, WebimMessage msg)
 {
     WebimHistory h = new WebimHistory();
     h.From = uid.ToString();
     h.Send = (offline == "true" ? 0 : 1);
     h.Nick = msg.Nick;
     h.Type = msg.Type;
     h.To = msg.To;
     h.Body = msg.Body;
     h.Style = msg.Style;
     h.Timestamp = msg.Timestamp;
     historyDao.Insert(h);
 }