whatsapp-client
whatsapp-client copied to clipboard
Add required missing file
Fix
The WhatsappClient\webwhatsapi\Wrapper::loadWapi method is trying to load the file wapi.js. This file not exists, so, this PR fixes it.
Hi,
This project have a build step:
php ./bin/build
And the build command will get the latest version of wapi.js
:
https://github.com/LibreCodeCoop/whatsapp-client/blob/master/src/Command/BuildCommand.php#L28
Maybe a good improvement point is to add this command before this row: https://github.com/LibreCodeCoop/whatsapp-client/blob/master/.docker/php/entrypoint.sh#L3
like this:
if [ ! -f "src/webwhatsapi/js/wapi.js" ]; then
php ./bin/build
fi
Maybe a best workaround is to use the composer hooks and implement a post-install-cmd
to run the command bin/build
Will be like this the implementation:
https://github.com/laravel/laravel/blob/10.x/composer.json#L35-L49
Ohh i missed it.
I searched for this on travis and composer and don't saw it.
About post-install-cmd i agree could be the best.