mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-10-27 14:57:02 +00:00
fe3eaee3fb
The WhatsApp migration was numbered v3.0.0, but help center added v2.5.0 through v2.7.0 and ships first. Renamed it to v2.8.0 so the upgrade path stays in order. Country data had two copies after the merge. The frontend kept its own hand written list in shared-ui, and the WhatsApp branch added an API backed store reading the same data from Go. Both lists were identical. Now countries.json in internal/countries is the only source. The shared-ui constant imports it through a new @countries Vite alias, so PhoneNumberInput, phone.js and ContactForm keep working as before. The sidebar and the WhatsApp form read the constant directly instead of fetching on mount. Static wins over the API here because the widget uses PhoneNumberInput and cannot call an authenticated endpoint, and phone.js builds its zod schema synchronously. So the countries store, api.getCountries, the /api/v1/countries route and countries.JSON() are gone. DialCodeForISO stays, it still builds the WhatsApp wa_id.