Compare commits
2 Commits
@egg/net-t
...
@egg/net-t
Author | SHA1 | Date | |
---|---|---|---|
76eb1c4cfc | |||
5e14057abc |
2
package-lock.json
generated
2
package-lock.json
generated
@ -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",
|
||||
|
@ -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
|
||||
|
@ -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",
|
||||
|
@ -145,18 +145,22 @@ class LarkMessageService extends LarkBaseService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新回复卡片消息
|
||||
* 更新或回复消息
|
||||
* @param messageId 消息ID
|
||||
* @returns 一个异步函数,用于更新或回复卡片消息
|
||||
* @param msgType 消息类型 包括:text、interactive
|
||||
* @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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user