googlechat icon indicating copy to clipboard operation
googlechat copied to clipboard

Direct chats with bots do not get bridged correctly.

Open bmccafferty opened this issue 2 years ago • 3 comments

In a private g/chat room with only yourself and a bot (say a webhook notification bot updating you on incident details from a ticketing system) this works fine in the g/chat interface however the bot chat never appears in the bridged room.

bmccafferty avatar Feb 10 '22 11:02 bmccafferty

To make issue clear example screenshots attached of g/chat and matrix rooms.

G-Chat: gchat-bot

Matrix: g-chat-matrix

bmccafferty avatar Feb 10 '22 11:02 bmccafferty

I can confirm that it doesn't work when the message is formatted as a card message. But it does when you send a simple text: curl -X POST -H "Content-Type: application/json" "${WEBHOOK_URL}" -d "{\"text\": \"test message\"}"

kafejniica avatar Jun 06 '22 19:06 kafejniica

JSON=$(cat <<EOF
{
  "cards": [
    {
      "header": {
        "title": "Hello,",
        "subtitle": "world!",
        "imageUrl": "https://www.gstatic.com/images/icons/material/product/2x/hangouts_64dp.png",
        "imageStyle": "IMAGE"
      }
    }
  ]
}
EOF
)

curl -X POST -H "Content-Type: application/json" --data "${JSON}" $WEBHOOK_URL

G-Chat: card_message

Matrix: nothing

log:

[2022-06-16 15:41:12,368] [[email protected]:AAAAymn12Js] Handling Google Chat message 5pOXsMMmucE
[2022-06-16 15:41:12,370] [[email protected]:AAAAymn12Js] Unhandled Google Chat message 5pOXsMMmucE
[2022-06-16 15:41:13,824] [[email protected]:AAAAymn12Js] Unhandled event type WEB_PUSH_NOTIFICATION

kafejniica avatar Jun 16 '22 15:06 kafejniica