mautrix / whatsapp

A Matrix-WhatsApp puppeting bridge
https://maunium.net/go/mautrix-whatsapp
GNU Affero General Public License v3.0
1.21k stars 170 forks source link

Tagging users doesn't work #659

Closed gouthamravee closed 4 months ago

gouthamravee commented 8 months ago

When tagging users, it doesn't get bridged properly to whatsapp.

On the whatsapp side, instead of a proper tag the message is plain text that's the username + (WA).

This is on the latest version of Synapse, Element, and the Mautrix Whatsapp bridge.

tulir commented 8 months ago

Works fine for me. What does the event source on Matrix contain?

gouthamravee commented 8 months ago

Tested just now

{
  "type": "m.room.message",
  "content": {
    "msgtype": "m.text",
    "body": "Neela S (WA) ",
    "format": "org.matrix.custom.html",
    "formatted_body": "Neela S (WA) ",
    "m.mentions": {
      "user_ids": [
        "@whatsapp_1<redacted-number>:my.domain"
      ]
    }
  }
}

the redacted number and my.domain are valid.

I'm thinking this is maybe a result of my setup, I have this setup using the ansible playbook for matrix, and I never got around to properly setting up federation.

tulir commented 8 months ago

There's no mention in formatted_body, so seems like a client bug. It's supposed to be <a href="https://matrix.to/#/@whatsapp_...">Neela S (WA)</a>

gouthamravee commented 8 months ago

Thank you, what client are you using? I'm using Element and I see this issue across desktop, web, and android.

tulir commented 8 months ago

It works for me on element web. Looks like element x android doesn't do mentions at all yet. Also afaik only element web/desktop has m.mentions implemented, not sure how that would fail to add the proper formatted body

gouthamravee commented 8 months ago

Is there a setting within the desktop/web app that enables/disables mentions? I tried to look through but didn't see anything.

Tbf, this isn't the only issue I have, so I figure a full reinstall from scratch would be the way to go.

niebloomj commented 4 months ago

Sounds like we can close this ticket