Compare commits

...

2 Commits

Author SHA1 Message Date
76eb1c4cfc chore(release): publish
- @egg/net-tool@1.27.0
2025-01-24 08:35:51 +00:00
5e14057abc feat(net-tool): 更新 updateReplyCard 方法为 updateReplyMessage,支持消息类型参数
All checks were successful
/ release (push) Successful in 24s
2025-01-24 08:35:28 +00:00
4 changed files with 17 additions and 7 deletions

2
package-lock.json generated
View File

@ -12394,7 +12394,7 @@
},
"packages/net-tool": {
"name": "@egg/net-tool",
"version": "1.26.2",
"version": "1.27.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.27.0](http://yingbo.im:3000/zhaoyingbo/egg_tools/compare/@egg/net-tool@1.26.2...@egg/net-tool@1.27.0) (2025-01-24)
### Features
- **net-tool:** 更新 updateReplyCard 方法为 updateReplyMessage支持消息类型参数 ([5e14057](http://yingbo.im:3000/zhaoyingbo/egg_tools/commits/5e14057abc1123005fc024225bcadccd383ed60f))
## [1.26.2](http://yingbo.im:3000/zhaoyingbo/egg_tools/compare/@egg/net-tool@1.26.1...@egg/net-tool@1.26.2) (2025-01-24)
### Bug Fixes

View File

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

View File

@ -145,18 +145,22 @@ class LarkMessageService extends LarkBaseService {
}
/**
*
*
* @param messageId ID
* @returns
* @param msgType textinteractive
* @returns
*/
updateReplyCard(messageId: string) {
updateReplyMessage(
messageId: string,
msgType: "text" | "interactive" = "interactive"
) {
let repliedMessageId = ""
return async (content: string) => {
if (repliedMessageId) {
await this.update(repliedMessageId, content)
await this.update(repliedMessageId, content, msgType === "text")
return repliedMessageId
}
const res = await this.replyCard(messageId, content)
const res = await this.reply(messageId, msgType, content)
if ("data" in res) {
repliedMessageId = res.data.message_id
}