feat(lark-msg-tool): 添加聊天类型判断属性
All checks were successful
/ release (push) Successful in 29s

This commit is contained in:
zhaoyingbo 2024-11-27 11:48:42 +00:00
parent fbd4555a40
commit 9495814ebf

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)
}