เฉพาะคำสั่ง C-PM-10 ให้ตัด receiverUserId ที่ส่ง noti ครั้งแรกออก #1995

This commit is contained in:
harid 2025-11-26 16:20:11 +07:00
parent a0f18b858f
commit 4ba71ff830

View file

@ -445,7 +445,11 @@ async function handler_command_noti(msg: amqp.ConsumeMessage): Promise<boolean>
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 profilesSendRequest = new CallAPI()
.PostData(