Compare commits

...

2 Commits

Author SHA1 Message Date
745c39428a chore(release): publish
- @egg/net-tool@1.25.0
2025-01-23 12:47:36 +00:00
0c39125434 feat(net-tool): 更新 sendText2Chat 方法,支持可选标题参数
All checks were successful
/ release (push) Successful in 29s
2025-01-23 12:47:07 +00:00
4 changed files with 12 additions and 4 deletions

2
package-lock.json generated
View File

@ -12394,7 +12394,7 @@
},
"packages/net-tool": {
"name": "@egg/net-tool",
"version": "1.24.0",
"version": "1.25.0",
"license": "ISC",
"dependencies": {
"@egg/logger": "^1.6.0",

View File

@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.25.0](http://yingbo.im:3000/zhaoyingbo/egg_tools/compare/@egg/net-tool@1.24.0...@egg/net-tool@1.25.0) (2025-01-23)
### Features
- **net-tool:** 更新 sendText2Chat 方法,支持可选标题参数 ([0c39125](http://yingbo.im:3000/zhaoyingbo/egg_tools/commits/0c39125434d83fd1480c9391a4ab8057406a4f07))
# [1.24.0](http://yingbo.im:3000/zhaoyingbo/egg_tools/compare/@egg/net-tool@1.23.0...@egg/net-tool@1.24.0) (2025-01-15)
### Features

View File

@ -1,6 +1,6 @@
{
"name": "@egg/net-tool",
"version": "1.24.0",
"version": "1.25.0",
"description": "Net Tools for Egg projects",
"type": "module",
"main": "src/index.ts",

View File

@ -46,9 +46,11 @@ class LarkMessageService extends LarkBaseService {
*
* @param receiveId IDID类型应与查询参数receiveIdType
* @param content
* @param title
*/
async sendText2Chat(receiveId: string, content: string) {
return this.send("chat_id", receiveId, "text", content)
async sendText2Chat(receiveId: string, content: string, title?: string) {
const messageContent = title ? `<b>${title}</b>\n${content}` : content
return this.send("chat_id", receiveId, "text", messageContent)
}
/**