This commit is contained in:
parent
8620752a46
commit
2043349d92
@ -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