open-wa / wa-automate-nodejs

💬 🤖 The most reliable tool for chatbots with advanced features. Be sure to 🌟 this repository for updates!
https://docs.openwa.dev/
Other
3.1k stars 589 forks source link

Outgoing media messages marked as incoming in Chatwoot #3053

Open antoniomdk opened 1 year ago

antoniomdk commented 1 year ago

Are you using the latest version of the library?

What type of session are you experiencing this issue on?

Multi-device and I have set multiDevice to true in my config OR am using the --multi-device flag

What type of host account are you experiencing this issue on?

Personal account (normal)

Mode

EASY API/CLI

Current Behavior

Outgoing audio and image messages sent from the mobile app are marked as incoming in Chatwoot. I've checked the chatwoot code and the logic looks fine to me, but maybe the .isMe field is not getting populated correctly.

Text messages are working fine as well as stickers (marked as UNHANDLED as may not be supported yet, but they're marked as outgoing).

Expected Behavior

Any outgoing message from the web or mobile app should be sent as outgoing type messages to Chatwoot.

Steps To Reproduce

  1. Run container based on dockerfile specified below
  2. Authenticate and wait for the chatwoot inbox to be created
  3. Send audio/image message from mobile app
  4. Check conversation in Chatwoot

create() code OR full CLI command + CONFIG

FROM openwa/wa-automate
ENTRYPOINT []
CMD WA_PORT=$PORT node ./node_modules/@open-wa/wa-automate/bin/server.js \
  --use-chrome \
  --force-port=$PORT \
  --in-docker \
  --qr-timeout 0 \
  --popup \
  --multi-device \
  --debug \
  --verbose \
  --disable-spins \
  --force-update-cw-webhook \
  --chatwoot-url "https://app.chatwoot.com/platform/api/v1" \
  --chatwoot-api-access-token $CHATWOOT_API_ACCESS_TOKEN \
  --ezqr

DEBUG INFO

Debug info: {
 "WA_VERSION": "2.2307.10",
 "PAGE_UA": "WhatsApp/2.2147.16 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36",
 "WA_AUTOMATE_VERSION": "4.57.0",
 "BROWSER_VERSION": "HeadlessChrome/110.0.5481.96",
 "OS": "Linux 5.4",
 "START_TS": 1677155299335,
 "RAM_INFO": "Total: 16.79 GB | Free: 15.40 GB",
 "PPTR_VERSION": "19.7.0"
}

Environment

- OS: Official docker image
- Node: 
- npm:

Screenshots/Logs

No response

Anything else?

No response

smashah commented 1 year ago

@antoniomdk can you share a screen recording of this please there's a lot of moving parts to integrating with chatwoot