diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 3a8b80883..f49398ff7 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -148,7 +148,7 @@ class WechatsController < ActionController::Base def join_request(request) openid = request[:FromUserName] - wl = WechatLog.where(openid: openid).order('id desc').first + wl = WechatLog.where("openid = '#{openid}' and request_raw like '%\"Event\":\"click\"%'").order('id desc').first wl && JSON(wl.request_raw)["EventKey"] == 'JOIN_CLASS' end