feat(lark-msg-tool): 获取文本内容自动trim
All checks were successful
/ release (push) Successful in 24s

This commit is contained in:
zhaoyingbo 2024-11-27 06:50:45 +00:00
parent f2bd83a8dc
commit 3bae9eb5c4

View File

@ -120,7 +120,7 @@ class LarkBody {
)
// 去掉@_user_1相关的内容例如 '@_user_1 测试' -> '测试'
const textWithoutAt = text.replace(/@_user_\d+/g, "")
return textWithoutAt
return textWithoutAt.trim()
} catch {
return ""
}