Skip to content

Commit

Permalink
Merge pull request #35 from korvin101/master
Browse files Browse the repository at this point in the history
Add new shortvideo Message. Credit goes to @korvin101
  • Loading branch information
messense committed Apr 11, 2015
2 parents 67c25ef + 94388f3 commit 8e4acc4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions wechatpy/enterprise/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ class VoiceMessage(messages.VoiceMessage):
agent = IntegerField('AgentID', 0)


@register_message('shortvideo')
class ShortVideoMessage(messages.ShortVideoMessage):
agent = IntegerField('AgentID', 0)


@register_message('video')
class VideoMessage(messages.VideoMessage):
agent = IntegerField('AgentID', 0)
Expand Down
12 changes: 12 additions & 0 deletions wechatpy/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,18 @@ class VoiceMessage(BaseMessage):
recognition = StringField('Recognition')


@register_message('shortvideo')
class ShortVideoMessage(BaseMessage):
"""
短视频消息
详情请参阅
http://mp.weixin.qq.com/wiki/10/79502792eef98d6e0c6e1739da387346.html
"""
type = 'shortvideo'
media_id = StringField('MediaId')
thumb_media_id = StringField('ThumbMediaId')


@register_message('video')
class VideoMessage(BaseMessage):
"""
Expand Down

0 comments on commit 8e4acc4

Please sign in to comment.