MCPcopy Create free account
hub / github.com/node-webot/wechat / getMessage

Function getMessage

lib/wechat.js:78–88  ·  view source on GitHub ↗
(stream, callback)

Source from the content-addressed store, hash-verified

76 * 从微信的提交中提取XML文件
77 */
78var getMessage = function (stream, callback) {
79 var buf = new BufferHelper();
80 buf.load(stream, function (err, buf) {
81 if (err) {
82 return callback(err);
83 }
84 var xml = buf.toString('utf-8');
85 stream.weixin_xml = xml;
86 xml2js.parseString(xml, {trim: true}, callback);
87 });
88};
89
90/*!
91 * 检查对象是否为空,对xml2js的workaround

Callers 2

respondFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected