This commit is contained in:
parent
833c5a5ede
commit
5b087179eb
|
@ -6,7 +6,6 @@ class WechatsController < ActionController::Base
|
||||||
|
|
||||||
# default text responder when no other match
|
# default text responder when no other match
|
||||||
on :text do |request, content|
|
on :text do |request, content|
|
||||||
if content.size == 6
|
|
||||||
#邀请码
|
#邀请码
|
||||||
if join_class(content)
|
if join_class(content)
|
||||||
root_url = "http://wechat.trustie.net"
|
root_url = "http://wechat.trustie.net"
|
||||||
|
@ -20,13 +19,11 @@ class WechatsController < ActionController::Base
|
||||||
description: n[:content],
|
description: n[:content],
|
||||||
pic_url: pic_url,
|
pic_url: pic_url,
|
||||||
url: url
|
url: url
|
||||||
end and return
|
end
|
||||||
else
|
else
|
||||||
request.reply.text "课程邀请码不正确" and return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
request.reply.text "您的意见已收到,感谢您的反馈!" # Just echo
|
request.reply.text "您的意见已收到,感谢您的反馈!" # Just echo
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# When receive 'help', will trigger this responder
|
# When receive 'help', will trigger this responder
|
||||||
on :text, with: 'help' do |request|
|
on :text, with: 'help' do |request|
|
||||||
|
|
Loading…
Reference in New Issue