mautrix / slack

A Matrix-Slack puppeting bridge
GNU Affero General Public License v3.0
61 stars 17 forks source link

Slack embedded objects are not shown #22

Open arkadym opened 1 year ago

arkadym commented 1 year ago

Hi, we have error reporting configured send errors to slack channel. Today i configured matrix to bridge that slack channel. Somehow only message text appearing (see below), but not all details.

It is supposed to be: image

In real it is: image

twouters commented 1 year ago

Example source message resulting in the same behavior:

        {
            "bot_id": "B03DM6XXXXX",
            "type": "message",
            "text": "",
            "user": "U03CXDXXXXX",
            "ts": "1687792189.893579",
            "app_id": "A03CXDXXXXX",
            "team": "TQEGXXXXX",
            "bot_profile": {
                "id": "B03DM6XXXXX",
                "deleted": false,
                "name": "Sentry",
                "updated": 1650957489,
                "app_id": "A03CXDXXXXX",
                "icons": {
                    "image_36": "https:\/\/avatars.slack-edge.com\/2022-04-26\/3432816908838_4a5919504d479a933a9a_36.png",
                    "image_48": "https:\/\/avatars.slack-edge.com\/2022-04-26\/3432816908838_4a5919504d479a933a9a_48.png",
                    "image_72": "https:\/\/avatars.slack-edge.com\/2022-04-26\/3432816908838_4a5919504d479a933a9a_72.png"
                },
                "team_id": "TQEGXXXXX"
            },
            "attachments": [
                {
                    "id": 1,
                    "ts": 1687792178,
                    "color": "E03E2F",
                    "fallback": "[api] GuzzleHttp\\Exception\\ConnectException: cURL error 6: Could not resolve host: <http:\/\/example.org|example.org> (see <https:\/\/curl.haxx.se\/lib>...",
                    "text": "cURL error 6: Could not resolve host: <http:\/\/example.org|example.org> (see <https:\/\/curl.haxx.se\/libcurl\/c\/libcurl-errors.html>) for <https:\/\/example.org\/api\/instances>",
                    "title": "GuzzleHttp\\Exception\\ConnectException",
                    "title_link": "https:\/\/sentry.example.org\/organizations\/sentry\/issues\/37557\/?referrer=slack",
                    "callback_id": "{\"issue\":37557}",
                    "footer": "API-1GQ via <https:\/\/sentry.example.org\/organizations\/sentry\/alerts\/rules\/api\/29\/details\/|Issue was changed to unresolved (or is a new issue)>",
                    "fields": [
                        {
                            "value": "prod",
                            "title": "environment",
                            "short": true
                        },
                        {
                            "value": "BE",
                            "title": "Country",
                            "short": true
                        },
                        {
                            "value": "verhip",
                            "title": "searchString",
                            "short": true
                        }
                    ],
                    "mrkdwn_in": [
                        "text"
                    ],
                    "actions": [
                        {
                            "id": "1",
                            "name": "resolve_dialog",
                            "text": "Resolve...",
                            "type": "button",
                            "value": "resolve_dialog",
                            "style": ""
                        },
                        {
                            "id": "2",
                            "name": "status",
                            "text": "Ignore",
                            "type": "button",
                            "value": "ignored",
                            "style": ""
                        },
                        {
                            "id": "3",
                            "name": "assign",
                            "text": "Select Assignee...",
                            "type": "select",
                            "data_source": "static",
                            "option_groups": [
                                {
                                    "text": "Teams",
                                    "options": [
                                        {
                                            "text": "#devteam",
                                            "value": "team:5"
                                        }
                                    ]
                                },
                                {
                                    "text": "People",
                                    "options": [
                                        {
                                            "text": "Test User",
                                            "value": "user:6"
                                        }
                                    ]
                                }
                            ],
                            "selected_options": [
                                {
                                    "value": "user:6",
                                    "text": "Test User"
                                }
                            ]
                        }
                    ]
                }
            ]
        }
copoer commented 11 months ago

I am also interested in getting embedded text to show up. I am wondering if we could have a setting to force it to just dump the raw embedded text

christheradioguy commented 5 days ago

Same issue for me. This is preventing me from adopting this bridge as I receive a lot of automated messages that are subject to this issue. As @copoer suggested above, even just a dump of the raw text would be sufficient.