Compare commits

...

2 Commits

Author SHA1 Message Date
ec9a9ef601 chore(release): publish
- @egg/lark-msg-tool@1.16.0
2024-11-27 11:49:10 +00:00
9495814ebf feat(lark-msg-tool): 添加聊天类型判断属性
All checks were successful
/ release (push) Successful in 29s
2024-11-27 11:48:42 +00:00
4 changed files with 12 additions and 2 deletions

2
package-lock.json generated
View File

@ -12373,7 +12373,7 @@
},
"packages/lark-msg-tool": {
"name": "@egg/lark-msg-tool",
"version": "1.15.1",
"version": "1.16.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.16.0](http://yingbo.im:3000/zhaoyingbo/egg_tools/compare/@egg/lark-msg-tool@1.15.1...@egg/lark-msg-tool@1.16.0) (2024-11-27)
### Features
- **lark-msg-tool:** 添加聊天类型判断属性 ([9495814](http://yingbo.im:3000/zhaoyingbo/egg_tools/commits/9495814ebf8926a68a40106ca0a5a3f377377085))
## [1.15.1](http://yingbo.im:3000/zhaoyingbo/egg_tools/compare/@egg/lark-msg-tool@1.15.0...@egg/lark-msg-tool@1.15.1) (2024-11-27)
**Note:** Version bump only for package @egg/lark-msg-tool

View File

@ -1,6 +1,6 @@
{
"name": "@egg/lark-msg-tool",
"version": "1.15.1",
"version": "1.16.0",
"description": "Lark Msg Tools for Egg projects",
"type": "module",
"main": "src/index.ts",

View File

@ -11,6 +11,8 @@ class LarkBody {
public msgText: string = ""
public rawMsgText: string = ""
public chatType?: LarkEvent.Message["chat_type"]
public isP2P?: boolean
public isInGroup?: boolean
public mentions?: LarkEvent.Mention[]
public actionType?: LarkAction.Data["action"]["tag"]
public actionValue?: LarkAction.Data["action"]["value"]
@ -40,6 +42,8 @@ class LarkBody {
this.msgText = this.getMsgText(eventBody)
this.rawMsgText = this.getRawMsgText(eventBody)
this.chatType = this.getChatType(eventBody)
this.isP2P = this.chatType === "p2p"
this.isInGroup = this.chatType === "group"
this.mentions = this.getMentions(eventBody)
}