Closed ekkesa closed 1 year ago
Nevermind - Saw it under documentation of the add-on.
How to send to a group is still unclear.
Thx!
I have tried the following for groups, but it doesn't seem to work. Any suggestions will be appreciated...
service: whatsapp.send_message
data:
clientId: default
to: KXyCcYkvXSX0X6aX42iX6o@g.us
body:
text: Test
- Some of the groupID characters have been replaced randomly.
For groups, listen to the new_whatsapp_message event in the developer area and view groupId. It worked for me.
Awesome! Thank you - Will try it.
MOVED IT TO A NEW ISSUE AS IT IS NOT DOCUMENTATION RELEVANT. Issue #2
@giuseppecastaldo - Had to remove add-on, it was unstable for some reason, but wanted to re-install. now it keeps failing with an auth error in the logs and not showing QR code.
Is the auth persistent somewhere in a config file?
I removed the whatsapp: entry from configuration.yaml, removed the addon, and restarted. Same error after install.
This is the log entries:
[2022-11-21T21:44:46.051] [INFO] default - Whatsapp Addon started.
/whatsapp.js:51
const { state, saveState } = useSingleFileAuthState(this.#path)
^
TypeError: useSingleFileAuthState is not a function
at WhatsappClient.connect (/whatsapp.js:51:38)
at new WhatsappClient (/whatsapp.js:45:14)
at init (/index.js:97:18)
at /index.js:111:5
at Array.forEach (<anonymous>)
at /index.js:110:19
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
Node.js v18.9.1
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
Could you please perhaps examples with syntax on the readme and if the message can handle templates.
Thank you!