From 06d17d9766a54da71c02afe601a4a36b69714c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=80=99=E5=AD=A6=E6=9D=B0?= Date: Wed, 20 Feb 2019 15:59:57 +0800 Subject: [PATCH] message --- src/Wechat/Work/Chat.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/Wechat/Work/Chat.php b/src/Wechat/Work/Chat.php index 4596a51..4b98456 100644 --- a/src/Wechat/Work/Chat.php +++ b/src/Wechat/Work/Chat.php @@ -1,6 +1,8 @@ id = $id; } + /** + * @param $msg MessageInterface + * @return mixed + */ + public function send($msg) + { + $request = $this->work->transformForJsonRequest('appchat/send', + array_merge($msg->toArray(), [ + 'chatid' => $this->id + ])); + return $this->work->request($request); + } + public function create(array $users, $owner = null, $name = null) { $params = [