Moving wechat logic into app.js.