From 4ba71ff83036bb03264a6abb6edc5c8f3e730e03 Mon Sep 17 00:00:00 2001 From: harid Date: Wed, 26 Nov 2025 16:20:11 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=89=E0=B8=9E=E0=B8=B2=E0=B8=B0?= =?UTF-8?q?=E0=B8=84=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87=20C-PM-1?= =?UTF-8?q?0=20=E0=B9=83=E0=B8=AB=E0=B9=89=E0=B8=95=E0=B8=B1=E0=B8=94=20re?= =?UTF-8?q?ceiverUserId=20=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B8=AA=E0=B9=88?= =?UTF-8?q?=E0=B8=87=20noti=20=E0=B8=84=E0=B8=A3=E0=B8=B1=E0=B9=89?= =?UTF-8?q?=E0=B8=87=E0=B9=81=E0=B8=A3=E0=B8=81=E0=B8=AD=E0=B8=AD=E0=B8=81?= =?UTF-8?q?=20#1995?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/rabbitmq.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/services/rabbitmq.ts b/src/services/rabbitmq.ts index dd57d886..74df4dc0 100644 --- a/src/services/rabbitmq.ts +++ b/src/services/rabbitmq.ts @@ -445,7 +445,11 @@ async function handler_command_noti(msg: amqp.ConsumeMessage): Promise 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(