Merge pull request 'feat: 消息转发接口支持同时指定多个接受者' (#24) from feat/multi-sender into master
All checks were successful
Egg CI/CD / build-image (push) Successful in 33s
Egg CI/CD / deploy (push) Successful in 26s

Reviewed-on: #24
This commit is contained in:
zhaoyingbo 2024-07-26 07:16:36 +00:00
commit d99bed9ec2
2 changed files with 19 additions and 13 deletions

View File

@ -1,5 +1,8 @@
name: Egg CI/CD
on: [push]
on:
push:
branches:
- master
jobs:
build-image:

View File

@ -109,19 +109,22 @@ export const manageMessageReq = async (req: Request) => {
if (email) email.map(makeSendFunc("email"))
}
// 如果有receive_id则发送给所有receive_id中的人
if (body.receive_id && body.receive_id_type) {
sendList.push(
service.lark.message
.send(appName)(
body.receive_id_type,
body.receive_id,
body.msg_type,
finalContent
)
.then((res) => {
sendRes[body.receive_id_type][body.receive_id] = res
})
)
body.receive_id.split(",").forEach((receive_id) => {
sendList.push(
service.lark.message
.send(appName)(
body.receive_id_type,
receive_id,
body.msg_type,
finalContent
)
.then((res) => {
sendRes[body.receive_id_type][receive_id] = res
})
)
})
}
try {