Compare commits
2 Commits
@egg/lark-
...
@egg/lark-
Author | SHA1 | Date | |
---|---|---|---|
6adca178f7 | |||
2043349d92 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -12258,7 +12258,7 @@
|
||||
},
|
||||
"packages/lark-msg-tool": {
|
||||
"name": "@egg/lark-msg-tool",
|
||||
"version": "1.3.1",
|
||||
"version": "1.4.0",
|
||||
"license": "ISC"
|
||||
},
|
||||
"packages/logger": {
|
||||
|
@ -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.4.0](http://yingbo.im:3000/zhaoyingbo/egg_tools/compare/@egg/lark-msg-tool@1.3.1...@egg/lark-msg-tool@1.4.0) (2024-09-26)
|
||||
|
||||
### Features
|
||||
|
||||
- **lark-msg:** 支持获取消息Id ([2043349](http://yingbo.im:3000/zhaoyingbo/egg_tools/commits/2043349d92f80bb1a1d9ab29cbb1061aa655b99d))
|
||||
|
||||
## [1.3.1](http://yingbo.im:3000/zhaoyingbo/egg_tools/compare/@egg/lark-msg-tool@1.3.0...@egg/lark-msg-tool@1.3.1) (2024-09-26)
|
||||
|
||||
**Note:** Version bump only for package @egg/lark-msg-tool
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@egg/lark-msg-tool",
|
||||
"version": "1.3.1",
|
||||
"version": "1.4.0",
|
||||
"description": "Lark Msg Tools for Egg projects",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
|
@ -108,4 +108,15 @@ export const getChatId = (body: LarkEvent.Data | LarkAction.Data) => {
|
||||
return ""
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取消息Id
|
||||
* @param body 事件消息体
|
||||
* @returns 消息Id
|
||||
*/
|
||||
export const getMessageId = (body: LarkEvent.Data | LarkAction.Data) => {
|
||||
if (getIsEventMsg(body)) return body?.event?.message?.message_id
|
||||
if (getIsActionMsg(body)) return body?.open_message_id
|
||||
return ""
|
||||
}
|
||||
|
||||
export { LarkAction, LarkEvent }
|
||||
|
Loading…
x
Reference in New Issue
Block a user