whatsapp-client icon indicating copy to clipboard operation
whatsapp-client copied to clipboard

Add required missing file

Open jomisacu opened this issue 1 year ago • 3 comments

Fix

The WhatsappClient\webwhatsapi\Wrapper::loadWapi method is trying to load the file wapi.js. This file not exists, so, this PR fixes it.

jomisacu avatar Dec 06 '23 20:12 jomisacu

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

vitormattos avatar Dec 06 '23 21:12 vitormattos

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

vitormattos avatar Dec 06 '23 21:12 vitormattos

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.

jomisacu avatar Dec 06 '23 21:12 jomisacu