diff --git a/README.md b/README.md index 582d5b0..0601a66 100644 --- a/README.md +++ b/README.md @@ -357,6 +357,8 @@ API_BASE=http://127.0.0.1:8800 |desp|消息内容第二部分,选填| |type|格式,选填|文本=text,markdown,图片=image,默认为markdown| +type 为 image 时,text 中为要发送图片的URL。 + #### 获得当前用户的消息列表 `POST /message/list` diff --git a/api/app/Http/Controllers/PushDeerMessageController.php b/api/app/Http/Controllers/PushDeerMessageController.php index 024056b..160fa2b 100644 --- a/api/app/Http/Controllers/PushDeerMessageController.php +++ b/api/app/Http/Controllers/PushDeerMessageController.php @@ -60,6 +60,10 @@ class PushDeerMessageController extends Controller $validated['type'] = 'markdown'; } + if (strtolower($validated['type'])=='image') { + $validated['text'] = '[图片]'; + } + $key = PushDeerKey::where('key', $validated['pushkey'])->get()->first(); $result = [];