Skip to content

Commit

Permalink
修复接收微信客服消息接口(新增open_kfid字段)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjinbo2010 committed Jan 13, 2024
1 parent a3f72cf commit c153a7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wechatpy/work/client/api/kf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class WeChatKF(BaseWeChatAPI):
https://work.weixin.qq.com/api/doc/90000/90135/94670
"""

def sync_msg(self, token, cursor="", limit=1000):
def sync_msg(self, token, open_kfid, cursor="", limit=1000):
"""
微信客户发送的消息、接待人员在企业微信回复的消息、发送消息接口发送失败事件(如被用户拒收)
、客户点击菜单消息的回复消息,可以通过该接口获取具体的消息内容和事件。不支持读取通过发送消息接口发送的消息。
Expand All @@ -28,6 +28,7 @@ def sync_msg(self, token, cursor="", limit=1000):
"token": token,
"cursor": cursor,
"limit": limit,
"open_kfid": open_kfid
}
return self._post("kf/sync_msg", data=data)

Expand Down
1 change: 1 addition & 0 deletions wechatpy/work/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ class KFMsgOrEventEvent(BaseEvent):

event = "kf_msg_or_event"
token = StringField("Token")
open_kfid = StringField("OpenKfId")


class ModifyCalendarEvent(BaseEvent):
Expand Down

0 comments on commit c153a7f

Please sign in to comment.