Merge branch 'feature/notify_file' into 'master'
支持文件 See merge request composer/php-wechat-sdk!2
This commit is contained in:
commit
1cf9ddb6df
|
@ -67,6 +67,7 @@ abstract class MessageInterface
|
||||||
$this->type => $this->attr,
|
$this->type => $this->attr,
|
||||||
]);
|
]);
|
||||||
break;
|
break;
|
||||||
|
case self::TYPE_FILE:
|
||||||
case self::TYPE_IMAGE:
|
case self::TYPE_IMAGE:
|
||||||
$params = array_merge($params, [
|
$params = array_merge($params, [
|
||||||
$this->type => [
|
$this->type => [
|
||||||
|
|
16
src/Wechat/Work/Message/TextFileMessage.php
Normal file
16
src/Wechat/Work/Message/TextFileMessage.php
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Wechat\Work\Message;
|
||||||
|
|
||||||
|
use Wechat\Work\Message\MessageInterface;
|
||||||
|
|
||||||
|
class TextFileMessage extends MessageInterface
|
||||||
|
{
|
||||||
|
|
||||||
|
public function __construct($content)
|
||||||
|
{
|
||||||
|
$this->type = self::TYPE_FILE;
|
||||||
|
$this->attr['media_id'] = $content;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user