This commit is contained in:
候学杰 2019-02-20 15:59:57 +08:00
parent 0805a74485
commit 06d17d9766

View File

@ -1,6 +1,8 @@
<?php <?php
namespace App\Wechat\Work; namespace Wechat\Work;
use Wechat\Work\Message\MessageInterface;
class Chat extends Base class Chat extends Base
{ {
@ -13,6 +15,19 @@ class Chat extends Base
$this->id = $id; $this->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) public function create(array $users, $owner = null, $name = null)
{ {
$params = [ $params = [