private void Instance_OnGetMessage(Libs.Base.ProtocolTreeNode messageNode, string from, string id, string name, string message, bool receipt_sent) { if (this.user.Jid.Contains(from)) { this.AddNewText(this.user.Nickname, message); } var messages = new Messages() { jid = this.user.Jid, messages = message }; DBProvider.DBConnection.Insert(messages); }
void Instance_OnGetMessageImage(Libs.Base.ProtocolTreeNode mediaNode, string from, string id, string fileName, int fileSize, string url, byte[] preview) { if (this.user.Jid.Contains(from)) { this.AddNewImage(this.user.Nickname, url); } var messages = new Messages() { jid = this.user.Jid, messages = url }; DBProvider.DBConnection.Insert(messages); }