|
@@ -487,9 +487,6 @@ namespace WeChatCore
|
|
|
me.MsgContent = ali.Content;
|
|
|
me.MsgOwerType = MsgOwerTypeEnum.AccepterMsg;
|
|
|
me.IsCanAutoReply = Mlie.IsCanAutoReply;
|
|
|
- //FromMsgList Fml = new FromMsgList(Environment.CurrentDirectory + "\\HeaderImages\\" + CustomName.ToList<Contacts>()[0].FileName + ".jpg", CustomName.ToList<Contacts>()[0].RemarkName, ali.Content);
|
|
|
- //Fml.MsgId = Wcmt.MsgId;
|
|
|
- //PlayVoice pv = new PlayVoice(Environment.CurrentDirectory + "\\HeaderImages\\" + CustomName.ToList<Contacts>()[0].FileName + ".jpg");
|
|
|
#region 储存消息
|
|
|
|
|
|
if (ali.MsgType == 34)
|
|
@@ -500,8 +497,6 @@ namespace WeChatCore
|
|
|
string FileId = MethodsHelper.MsgSaveFile(DirectoryDefine.VoiceMsgPath);//获取FileId
|
|
|
//根据FileID创建本地的语音对象
|
|
|
List<byte> list = HttpMethods.GetFile(Url, Environment.CurrentDirectory + "\\" + DirectoryDefine.VoiceMsgPath + "\\" + FileId + ".mp3", CommonDefine.Cookies).ContentData as List<byte>;
|
|
|
- //将下载下来的MP3文件转成Base64进行储存
|
|
|
- // string Base64Str = Convert.ToBase64String(list.ToArray());
|
|
|
me.MsgTime = DateTime.Now;
|
|
|
me.FileId = FileId;
|
|
|
me.FilePath = Environment.CurrentDirectory + "\\" + DirectoryDefine.VoiceMsgPath + "\\" + me.FileId + ".mp3";
|
|
@@ -532,9 +527,6 @@ namespace WeChatCore
|
|
|
string FileId = MethodsHelper.MsgSaveFile(DirectoryDefine.ImageMsgGifPath);//获取FileId
|
|
|
HttpMethods.GetFile(Url, Environment.CurrentDirectory + "\\" + DirectoryDefine.ImageMsgGifPath + "\\" + FileId + ".gif", CommonDefine.Cookies);
|
|
|
HttpMethods.GetFile(string.Format(UrlDefine.ImgUrl, ali.MsgId, CommonDefine.LoginResult.skey), Environment.CurrentDirectory + "\\" + DirectoryDefine.ImageMsgTempPath + "\\" + FileId + ".jpg", CommonDefine.Cookies);
|
|
|
- //将下载下来的MP3文件转成Base64进行储存
|
|
|
- //string Base64Str = Convert.ToBase64String(list.ToArray());
|
|
|
- // Wcmt.MsgText = Base64Str;
|
|
|
me.MsgTime = DateTime.Now;
|
|
|
me.FileId = FileId;
|
|
|
me.FilePath = Environment.CurrentDirectory + "\\" + DirectoryDefine.ImageMsgGifPath + "\\" + FileId + ".gif";//
|
|
@@ -549,9 +541,6 @@ namespace WeChatCore
|
|
|
HttpMethods.GetFile(string.Format(UrlDefine.ImgUrl, ali.MsgId, CommonDefine.LoginResult.skey), Environment.CurrentDirectory + "\\" + DirectoryDefine.ImageMsgTempPath + "\\" + FileId + ".jpg", CommonDefine.Cookies);
|
|
|
//根据FileID创建本地的语音对象
|
|
|
List<byte> list = HttpMethods.GetVideo(Url, Environment.CurrentDirectory + "\\" + DirectoryDefine.VideoMsgPath + "\\" + FileId + ".mp4", CommonDefine.Cookies);
|
|
|
- //将下载下来的视频文件转成Base64进行储存
|
|
|
- //string Base64Str = Convert.ToBase64String(list.ToArray());
|
|
|
- //Wcmt.MsgText = Base64Str;
|
|
|
me.MsgTime = DateTime.Now;
|
|
|
me.FileId = FileId;
|
|
|
me.FilePath = Environment.CurrentDirectory + "\\" + DirectoryDefine.VideoMsgPath + "\\" + FileId + ".mp4";//
|
|
@@ -570,9 +559,6 @@ namespace WeChatCore
|
|
|
HttpMethods.GetFile(Url, Environment.CurrentDirectory + "\\" + DirectoryDefine.MapImageMsgPath + "\\" + FileId + ".jpg", CommonDefine.Cookies);
|
|
|
me.FilePath = Environment.CurrentDirectory + "\\" + DirectoryDefine.MapImageMsgPath + "\\" + FileId + ".jpg";
|
|
|
me.MsgTime = DateTime.Now;
|
|
|
- //Wcmt.MsgOwer = CustomName.ToList()[0].FileName;
|
|
|
- //Wcmt.MsgExt = ali.Url + "|" + FileId;
|
|
|
- //MsgTypeTableExt.InsertWeChatMsgTable(Wcmt);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -676,7 +662,7 @@ namespace WeChatCore
|
|
|
/// <param name="AutoRelyList">自动回复列表</param>
|
|
|
/// <param name="UserName">用户名</param>
|
|
|
/// <param name="MsgContent">消息内容(不用管)</param>
|
|
|
- public static void SetAutoRepate(List<MemberListItemEntity> UserList, List<AutoRepateEntity> AutoRelyList, string UserName, MsgEntity MsgContent)
|
|
|
+ internal static void SetAutoRepate(List<MemberListItemEntity> UserList, List<AutoRepateEntity> AutoRelyList, string UserName, MsgEntity MsgContent)
|
|
|
{
|
|
|
if (UserList == null) UserList = new List<MemberListItemEntity>();
|
|
|
if (AutoRelyList.Count == 0)
|