chore: move docs to docs/ folder and remove vendor references from comments

- Move INTERACTIVE_MESSAGES.md to docs/ folder
- Remove all third-party name references from code comments
- Temporarily remove docs from .gitignore to allow tracking

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Renato Alcara
2026-02-15 09:48:03 -03:00
parent 83e2023a45
commit 8e6db8f477
4 changed files with 7 additions and 8 deletions
-1
View File
@@ -9,7 +9,6 @@ baileys_store*.json
browser-messages.json
browser-token.json
decoded-ws.json
docs
lib
messages*.json
node_modules
+6 -6
View File
@@ -848,7 +848,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
// Convert nativeFlowMessage with single_select to direct listMessage (legacy format)
// This is required because WhatsApp expects listMessage format with biz > list node
// The viewOnceMessage > interactiveMessage > nativeFlowMessage wrapper causes error 479
// Reference: Pastorini sends as direct listMessage and it works on phone + web
// Reference: direct listMessage works on phone + web
const innerMsg = message.viewOnceMessage?.message
const nativeFlow = innerMsg?.interactiveMessage?.nativeFlowMessage
if (nativeFlow?.buttons?.length) {
@@ -1252,7 +1252,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
const isCarousel = isCarouselMessage(message)
// Collect biz/bot nodes to append AFTER device-identity and tctoken
// Pastorini order: participants → device-identity → tctoken → biz
// Stanza order: participants → device-identity → tctoken → biz
// The biz node MUST be last for WhatsApp Web carousel rendering
const deferredNodes: BinaryNode[] = []
@@ -1317,7 +1317,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
const isCTAOnly = hasCTA && !hasQuickReply
// For listMessage (legacy format), use direct <list> tag
// This matches pastorini's working implementation
// This matches the known working implementation
if (buttonType === 'list') {
deferredNodes.push({
tag: 'biz',
@@ -1475,7 +1475,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
}
}
// Pastorini's working carousel includes tctoken in stanza
// Working carousel includes tctoken in stanza
const contactTcTokenData =
!isGroup && !isRetryResend && !isStatus ? await authState.keys.get('tctoken', [destinationJid]) : {}
@@ -1494,7 +1494,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
}
// Append deferred biz/bot nodes LAST (after device-identity, tctoken)
// Pastorini order: participants → device-identity → tctoken → biz
// Stanza order: participants → device-identity → tctoken → biz
if (deferredNodes.length > 0) {
;(stanza.content as BinaryNode[]).push(...deferredNodes)
}
@@ -2096,7 +2096,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
const userJid = authState.creds.me!.id
// Special path for carousel: call relayMessage directly with plain JS object
// This matches Pastorini's working approach:
// This matches the known working approach:
// 1. Build message as plain JS object (not proto instance)
// 2. Pass directly to relayMessage (no WAProto.Message.fromObject/create)
// 3. protobuf encode() handles plain objects correctly during serialization
+1 -1
View File
@@ -683,7 +683,7 @@ export const generateCarouselMessage = async (
)
// Build the interactive message with carousel
// Match Pastorini's EXACT working structure:
// Known working structure:
// - Direct interactiveMessage at root (NO viewOnceMessage wrapper)
// - Root header with title + hasMediaAttachment: false
// - messageVersion: 1 in carouselMessage