Skip to content

Commit

Permalink
fix: 修复继承关系不当,可能类型误判的问题 (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
LKI authored and messense committed Jun 14, 2019
1 parent 2f5eaa7 commit 8645724
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions wechatpy/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,22 +80,27 @@ class ComponentUnauthorizedMessage(BaseComponentMessage):


@register_component_message('authorized')
class ComponentAuthorizedMessage(ComponentUnauthorizedMessage):
class ComponentAuthorizedMessage(BaseComponentMessage):
"""
新增授权通知
"""
type = 'authorized'
authorizer_appid = StringField('AuthorizerAppid')
authorization_code = StringField('AuthorizationCode')
authorization_code_expired_time = StringField('AuthorizationCodeExpiredTime')
pre_auth_code = StringField('PreAuthCode')


@register_component_message('updateauthorized')
class ComponentUpdateauthorizedMessage(ComponentAuthorizedMessage):
class ComponentUpdateauthorizedMessage(BaseComponentMessage):
"""
更新授权通知
"""
type = 'updateauthorized'
authorizer_appid = StringField('AuthorizerAppid')
authorization_code = StringField('AuthorizationCode')
authorization_code_expired_time = StringField('AuthorizationCodeExpiredTime')
pre_auth_code = StringField('PreAuthCode')


class ComponentUnknownMessage(BaseComponentMessage):
Expand Down

0 comments on commit 8645724

Please sign in to comment.