增效图片消息
This commit is contained in:
parent
db20f3453c
commit
aec96fb36d
|
@ -67,6 +67,13 @@ abstract class MessageInterface
|
|||
$this->type => $this->attr,
|
||||
]);
|
||||
break;
|
||||
case self::TYPE_IMAGE:
|
||||
$params = array_merge($params, [
|
||||
$this->type => [
|
||||
'media_id' => $this->attr['media_id'],
|
||||
],
|
||||
]);
|
||||
break;
|
||||
default:
|
||||
throw new \Exception('message type ' . $this->type . ' is not allow');
|
||||
}
|
||||
|
|
16
src/Wechat/Work/Message/TextImageMessage.php
Normal file
16
src/Wechat/Work/Message/TextImageMessage.php
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace Wechat\Work\Message;
|
||||
|
||||
use Wechat\Work\Message\MessageInterface;
|
||||
|
||||
class TextImageMessage extends MessageInterface
|
||||
{
|
||||
|
||||
public function __construct($content)
|
||||
{
|
||||
$this->type = self::TYPE_IMAGE;
|
||||
$this->attr['media_id'] = $content;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user