From b7cdb390985b6c1a8ff94466bdd318cad271e539 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 2 Feb 2026 21:08:13 +0000 Subject: [PATCH] fix(messages): revert retry resend logic to fix interactive message delivery CRITICAL FIX: Line 1117 in messages-send.ts was incorrectly changed to use isAnyLidUser() which includes hosted LID users (@hosted.lid). This broke the retry resend logic for hosted accounts. The code uses isParticipantLid to decide whether to compare participant JID against meLid or meId: const isMe = areJidsSameUser(participant!.jid, isParticipantLid ? meLid : meId) For hosted LID users, the correct comparison should use meId, not meLid. By using isAnyLidUser(), we were incorrectly returning true for hosted LID users, causing wrong comparison and breaking retry message encoding. This directly affected interactive message (buttons/lists/carousels) delivery for hosted accounts. Changes: - Line 1117: Reverted from isAnyLidUser() to isLidUser() - Added comment explaining why hosted LID users should not be included Note: Lines 294, 458, 461 remain using isAnyLidUser/isAnyPnUser because they originally used (isLidUser || isHostedLidUser) pattern, so the consolidated helpers are functionally equivalent and safe. https://claude.ai/code/session_0149ZKk2ygmKCJTGu39Mr8oH --- src/Socket/messages-send.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Socket/messages-send.ts b/src/Socket/messages-send.ts index ff8c4415..58339125 100644 --- a/src/Socket/messages-send.ts +++ b/src/Socket/messages-send.ts @@ -1112,7 +1112,9 @@ export const makeMessagesSocket = (config: SocketConfig) => { } if (isRetryResend) { - const isParticipantLid = isAnyLidUser(participant!.jid) + // Only check for regular LID users, NOT hosted LID users + // Hosted LID users should use meId for comparison, not meLid + const isParticipantLid = isLidUser(participant!.jid) const isMe = areJidsSameUser(participant!.jid, isParticipantLid ? meLid : meId) const encodedMessageToSend = isMe