Commit e5aca063c19167c6a8c548f454b5226654f38ed2

Authored by lanrion
1 parent 1aef119f
Exists in master

修复自定义token bug

Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
lib/qy_wechat_api/client.rb
... ... @@ -7,7 +7,7 @@ module QyWechatApi
7 7  
8 8 def initialize(corp_id, group_secret, options={})
9 9 redis_key = options[:redis_key]
10   - @custom_access_token = options[:custom_access_token]
  10 + @custom_access_token = options[:access_token]
11 11 @corp_id = corp_id
12 12 @group_secret = group_secret
13 13 @redis_key = security_redis_key((redis_key || "qy_#{group_secret}"))
... ... @@ -22,6 +22,7 @@ module QyWechatApi
22 22  
23 23 # 检查appid和app_secret是否有效。
24 24 def is_valid?
  25 + return true if custom_access_token.present?
25 26 @storage.valid?
26 27 end
27 28  
... ...