Skip to content

Commit

Permalink
Merge c3a9390 into 62de22f
Browse files Browse the repository at this point in the history
  • Loading branch information
wxhuang committed Jun 18, 2015
2 parents 62de22f + c3a9390 commit 05ef62e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/wechat.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ var reply = function (content, fromUsername, toUsername, message) {
delete info.content;
info.DeviceStatus = isNaN(content) ? 0 : content;
} else {
info.content = new Buffer(String(content)).toString('base64');
if (!(content instanceof Buffer)) {
content = String(content);
}
info.content = new Buffer(content).toString('base64');
}
type = message.MsgType;
if (message.MsgType === 'device_event') {
Expand Down

0 comments on commit 05ef62e

Please sign in to comment.