Skip to content

Commit

Permalink
fix: fix the bug of subscribe
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz committed Aug 24, 2020
1 parent 65ee4d1 commit d00a6e3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Expand Up @@ -12,7 +12,12 @@ app.use(express.query());
app.use('/', wechat(config, function (req, res, next) {
var message = req.weixin;
if (message.MsgType === 'device_event') {
res.reply(chemicaltoolsbot('help', 'zh'))
if (message.Event === 'subscribe_status' ||
message.Event === 'unsubscribe_status') {
res.reply(1);
} else {
res.reply(chemicaltoolsbot('help', 'zh'))
}
} else {
res.reply(chemicaltoolsbot(message.Content, 'zh'))
}
Expand Down

0 comments on commit d00a6e3

Please sign in to comment.