增加了微信模板回调的实现,麻烦合并 templatesendjobfinish_event 分支请求 #544
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
此 PR 是针对 #541 问题的处理
微信公众号(服务号)在调用 Client 发送模板信息后,微信会将该模板信息的推送到用户微信并向开发者的服务器发送其模板信息推送的结果,详情见 公众号文档/模板消息
werobot 在处理该类事件的时候,虽然
werobot.messages.events
已经存在这个 event,但是并没有将其增加到BaseRoBot.message_types
并且加入到BaseRoBot
里面我参考微信官方文档,按照 WeRoBot 的代码习惯增加代码部分实现如下:
BaseRoBot.message_types
增加templatesendjobfinish_event
的引用BaseRoBot
增加方法templatesendjobfinish_event
测试部分增加/修改细节如下:
test_parser.py
里templatesendjobfinish_event
测试改了个名字test_handler.py
增加templatesendjobfinish_event
的调用测试文档部分因为增加
templatesendjobfinish_event
调整如下docs/handlers.rst
的表格中增加templatesendjobfinish_event
事件的说明测试说明:
以上~