Skip to content

Commit

Permalink
fix: 无法给个人发送本地图片和消息列表
Browse files Browse the repository at this point in the history
  • Loading branch information
Cassius0924 committed Feb 20, 2024
1 parent 34516b1 commit 34c487d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wechatter/sender/sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,9 @@ def _send_msg_list2(
if not is_group:
return _send_msg_list1(to.p_name, message_list, is_group=False, type=type)

if to.g_name != "":
if to.group:
return _send_msg_list1(to.g_name, message_list, is_group=True, type=type)
elif to.p_name != "":
elif to.person:
return _send_msg_list1(to.p_name, message_list, is_group=False, type=type)
else:
logger.error("发送消息失败,接收者为空")
Expand Down Expand Up @@ -374,9 +374,9 @@ def _send_localfile_msg2(to: SendTo, file_path: str, is_group: bool = True):
if not is_group:
return _send_localfile_msg1(to.p_name, file_path, is_group=False)

if to.g_name != "":
if to.group:
return _send_localfile_msg1(to.g_name, file_path, is_group=True)
elif to.p_name != "":
elif to.person:
return _send_localfile_msg1(to.p_name, file_path, is_group=False)
else:
logger.error("发送消息失败,接收者为空")
Expand Down

0 comments on commit 34c487d

Please sign in to comment.