fix(migrate): drop WhatsApp LID dual-row migration step
Remove step 2d (whatsapp-resolve-lids.ts) which pre-created duplicate messaging_groups rows keyed by @lid alongside the phone-keyed rows. This caused split sessions — the same contact got separate sessions depending on which JID format arrived. With the Baileys v7 upgrade (PR #2259 on channels), the adapter resolves every LID to a phone JID via extractAddressingContext before the message reaches the router, making dual rows unnecessary. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -408,20 +408,12 @@ else
|
||||
fi
|
||||
done
|
||||
|
||||
# 2d. WhatsApp LID resolution. After whatsapp is installed (so Baileys
|
||||
# is on disk) and auth files have been copied (so we can connect with
|
||||
# the migrated identity), boot Baileys briefly to learn LID↔phone
|
||||
# mappings during initial sync, then write paired LID-keyed
|
||||
# messaging_groups. Best-effort: any failure degrades to runtime
|
||||
# approval flow, which the WA adapter's isMention=true on DMs handles.
|
||||
for ch in "${SELECTED_CHANNELS[@]}"; do
|
||||
if [ "$ch" = "whatsapp" ]; then
|
||||
run_step "2d-whatsapp-lids" \
|
||||
"Resolve WhatsApp LIDs for migrated DMs" \
|
||||
"setup/migrate-v2/whatsapp-resolve-lids.ts"
|
||||
break
|
||||
fi
|
||||
done
|
||||
# 2d. (Removed) WhatsApp LID resolution was previously needed because the
|
||||
# v6 adapter couldn't reliably translate LID→phone JIDs, so the migration
|
||||
# pre-created dual messaging_groups rows. With Baileys v7, the adapter
|
||||
# resolves LIDs via extractAddressingContext + signalRepository.lidMapping
|
||||
# on every inbound message, so dual rows are unnecessary and were causing
|
||||
# split sessions.
|
||||
fi
|
||||
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user