From c940527694d88576b68629512c54deb0841b2585 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Mon, 20 Jun 2016 17:12:53 +0800 Subject: [PATCH] . --- app/controllers/wechats_controller.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 00585722c..5edaf63e5 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -128,8 +128,13 @@ class WechatsController < ActionController::Base default_msg(request) end - on :click, with: 'JOIN_CLASS' do |reques, key| - request.reply.text "请直接回复班级邀请码 (不区分大小写):" + on :click, with: 'JOIN_CLASS' do |request, key| + uw = user_binded?(request[:FromUserName]) + unless uw + sendBind(request) + else + request.reply.text "请直接回复班级邀请码 (不区分大小写):" + end end def default_msg(request)