Skip to content

Commit

Permalink
修复在回调中调用同步接口返回None的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
smallevilbeast committed Sep 9, 2022
1 parent 8db8998 commit 9a0cc00
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1 align="center">NtChat</h1>
<p align="center">
<a href="https://github.com/smallevilbeast/ntchat/releases"><img src="https://img.shields.io/badge/release-0.1.11-blue.svg?" alt="release"></a>
<a href="https://github.com/smallevilbeast/ntchat/releases"><img src="https://img.shields.io/badge/release-0.1.12-blue.svg?" alt="release"></a>
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-brightgreen.svg?" alt="License"></a>
</p>

Expand Down
6 changes: 5 additions & 1 deletion examples/auto_accept_friend_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ def on_recv_text_msg(wechat_instance: ntchat.WeChat, message):
scene = dom.documentElement.getAttribute("scene")

# 自动同意好友申请
wechat_instance.accept_friend_request(encryptusername, ticket, int(scene))
ret = wechat_instance.accept_friend_request(encryptusername, ticket, int(scene))

if ret:
# 通过后向他发条消息
wechat_instance.send_text(to_wxid=ret["userName"], content="你好!!!!!")


# 以下是为了让程序不结束,如果有用于PyQt等有主循环消息的框架,可以去除下面代码
Expand Down
2 changes: 1 addition & 1 deletion ntchat/conf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = '0.1.11'
VERSION = '0.1.12'

LOG_LEVEL = "DEBUG"
LOG_KEY = 'NTCHAT_LOG'
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def add_prefix(l, prefix):

setup(
name='ntchat',
version='0.1.11',
version='0.1.12',
description='About Conversational RPA SDK for Chatbot Makers',
long_description="",
long_description_content_type='text/markdown',
Expand Down

0 comments on commit 9a0cc00

Please sign in to comment.