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 = [