更新type为image时,通知文案的显示

This commit is contained in:
EasyChen 2022-01-31 16:49:03 +08:00
parent 623321f217
commit 451334d428
2 changed files with 6 additions and 0 deletions

View File

@ -357,6 +357,8 @@ API_BASE=http://127.0.0.1:8800
|desp|消息内容第二部分,选填| |desp|消息内容第二部分,选填|
|type|格式,选填|文本=textmarkdown图片=image默认为markdown| |type|格式,选填|文本=textmarkdown图片=image默认为markdown|
type 为 image 时text 中为要发送图片的URL。
#### 获得当前用户的消息列表 #### 获得当前用户的消息列表
`POST /message/list` `POST /message/list`

View File

@ -60,6 +60,10 @@ class PushDeerMessageController extends Controller
$validated['type'] = 'markdown'; $validated['type'] = 'markdown';
} }
if (strtolower($validated['type'])=='image') {
$validated['text'] = '[图片]';
}
$key = PushDeerKey::where('key', $validated['pushkey'])->get()->first(); $key = PushDeerKey::where('key', $validated['pushkey'])->get()->first();
$result = []; $result = [];