From 56ea314e71ec5a937dd0b5af3e4f5d9addf997f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=AF=E7=99=BB=E5=B3=B0?= Date: Fri, 12 Jul 2019 18:21:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Wechat/Work/Message/MessageInterface.php | 1 + src/Wechat/Work/Message/TextFileMessage.php | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 src/Wechat/Work/Message/TextFileMessage.php diff --git a/src/Wechat/Work/Message/MessageInterface.php b/src/Wechat/Work/Message/MessageInterface.php index b0366b3..e056312 100644 --- a/src/Wechat/Work/Message/MessageInterface.php +++ b/src/Wechat/Work/Message/MessageInterface.php @@ -67,6 +67,7 @@ abstract class MessageInterface $this->type => $this->attr, ]); break; + case self::TYPE_FILE: case self::TYPE_IMAGE: $params = array_merge($params, [ $this->type => [ diff --git a/src/Wechat/Work/Message/TextFileMessage.php b/src/Wechat/Work/Message/TextFileMessage.php new file mode 100644 index 0000000..be20507 --- /dev/null +++ b/src/Wechat/Work/Message/TextFileMessage.php @@ -0,0 +1,16 @@ +type = self::TYPE_FILE; + $this->attr['media_id'] = $content; + } + +} \ No newline at end of file