เฉพาะคำสั่ง C-PM-10 ให้ตัด receiverUserId ที่ส่ง noti ครั้งแรกออก #1995
This commit is contained in:
parent
a0f18b858f
commit
4ba71ff830
1 changed files with 5 additions and 1 deletions
|
|
@ -445,7 +445,11 @@ async function handler_command_noti(msg: amqp.ConsumeMessage): Promise<boolean>
|
||||||
isSendNotification: true,
|
isSendNotification: true,
|
||||||
}))
|
}))
|
||||||
: [];
|
: [];
|
||||||
|
/*เฉพาะคำสั่ง C-PM-10 ให้ตัด receiverUserId ที่ส่ง noti ครั้งแรกออก*/
|
||||||
|
if (command && command.commandType && ["C-PM-10"].includes(command.commandType.code)) {
|
||||||
|
const firstNotiIds = profiles.map((p:any) => p.receiverUserId);
|
||||||
|
profilesSend = profilesSend.filter((x:any) => !firstNotiIds.includes(x.receiverUserId));
|
||||||
|
}
|
||||||
const payloadStr = await PayloadSendNoti(command.id);
|
const payloadStr = await PayloadSendNoti(command.id);
|
||||||
const profilesSendRequest = new CallAPI()
|
const profilesSendRequest = new CallAPI()
|
||||||
.PostData(
|
.PostData(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue