feat(lark-msg): 支持获取消息Id
All checks were successful
/ release (push) Successful in 57s

This commit is contained in:
zhaoyingbo 2024-09-26 02:42:46 +00:00
parent 8620752a46
commit 2043349d92

View File

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