Skip to content

Commit

Permalink
a little change
Browse files Browse the repository at this point in the history
  • Loading branch information
yaphone committed May 11, 2017
1 parent 194b486 commit 904e671
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions src/test/java/cn/zhouyafeng/itchat4j/demo/SimpleDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.alibaba.fastjson.JSONObject;

import cn.zhouyafeng.itchat4j.Wechat;
import cn.zhouyafeng.itchat4j.api.MessageTools;
import cn.zhouyafeng.itchat4j.face.IMsgHandlerFace;
import cn.zhouyafeng.itchat4j.utils.DownloadTools;
import cn.zhouyafeng.itchat4j.utils.MsgType;
Expand All @@ -24,17 +23,17 @@ public class SimpleDemo implements IMsgHandlerFace {

@Override
public String textMsgHandle(JSONObject msg) {
String docFilePath = "D:/itchat4j/pic/test.docx";
String pngFilePath = "D:/itchat4j/pic/test.png";
String pdfFilePath = "D:/itchat4j/pic/测试.pdf";
String txtFilePath = "D:/itchat4j/pic/test.txt";
MessageTools.sendFileMsgByNickName("yaphone", docFilePath);
MessageTools.sendFileMsgByNickName("yaphone", pngFilePath);
MessageTools.sendFileMsgByNickName("yaphone", pdfFilePath);
MessageTools.sendFileMsgByNickName("yaphone", txtFilePath);
// String text = msg.getString("Text");
// return text;
return null;
// String docFilePath = "D:/itchat4j/pic/test.docx";
// String pngFilePath = "D:/itchat4j/pic/test.png";
// String pdfFilePath = "D:/itchat4j/pic/测试.pdf";
// String txtFilePath = "D:/itchat4j/pic/test.txt";
// MessageTools.sendFileMsgByNickName("yaphone", docFilePath);
// MessageTools.sendFileMsgByNickName("yaphone", pngFilePath);
// MessageTools.sendFileMsgByNickName("yaphone", pdfFilePath);
// MessageTools.sendFileMsgByNickName("yaphone", txtFilePath);
String text = msg.getString("Text");
return text;
// return null;
}

@Override
Expand Down

0 comments on commit 904e671

Please sign in to comment.