From 4e7fb3fdcee04e75b6f96cbcf68275b402ce7187 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 7 Feb 2026 03:09:08 +0000 Subject: [PATCH] fix(carousel): re-add own device skip to prevent error 479 Carousel messages in DSM (deviceSentMessage) wrapper cause error 479 on sender's own linked devices. Re-add the skip that prevents sending carousel to own devices. https://claude.ai/code/session_018DkDxsjWzM131jy3ivWjZp --- src/Socket/messages-send.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Socket/messages-send.ts b/src/Socket/messages-send.ts index 543770b0..78de8d76 100644 --- a/src/Socket/messages-send.ts +++ b/src/Socket/messages-send.ts @@ -1125,6 +1125,9 @@ export const makeMessagesSocket = (config: SocketConfig) => { const { user: mePnUser } = jidDecode(meId)! const { user: meLidUser } = meLid ? jidDecode(meLid)! : { user: null } + // Carousel in DSM wrapper causes error 479 on own devices + const isCarouselMsg = isCarouselMessage(message) + for (const { user, jid } of devices) { const isExactSenderDevice = jid === meId || (meLid && jid === meLid) if (isExactSenderDevice) { @@ -1136,6 +1139,10 @@ export const makeMessagesSocket = (config: SocketConfig) => { const isMe = user === mePnUser || user === meLidUser if (isMe) { + if (isCarouselMsg) { + logger.debug({ jid }, '[CAROUSEL] Skipping own device - DSM carousel causes error 479') + continue + } meRecipients.push(jid) } else { otherRecipients.push(jid) @@ -1170,7 +1177,8 @@ export const makeMessagesSocket = (config: SocketConfig) => { const isParticipantLid = isLidUser(participant!.jid) const isMe = areJidsSameUser(participant!.jid, isParticipantLid ? meLid : meId) - const usesDSM = isMe + // Skip DSM for carousel - own devices reject it with error 479 + const usesDSM = isMe && !isCarouselMessage(message) const encodedMessageToSend = usesDSM ? encodeWAMessage({ deviceSentMessage: {