Skip to content

unknown variant rich_text #170

Description

@Mattsi-Jansky

I'm hitting some issues when parsing valid blocks sent back from the Slack API because they include type of rich_text which doesn't appear to be supported. And I'm struggling to find it anywhere in the Slack blocks documentation, so it might be undocumented?

Specifically, the error:

---- should_send_acknowledgement_of_event_messages stdout ----
thread 'should_send_acknowledgement_of_event_messages' panicked at 'called `Result::unwrap()` on an `Err` value: Error("unknown variant `rich_text`, expected one of `section`, `divider`, `image`, `actions`, `context`, `input`, `header`, `file`", line: 0, column: 0)', client/tests/web_sockets.rs:97:27

And the Slack message, which is a response from the api/chat.postMessage action, some identifying details omitted:

{
  "ok": true,
  "channel": "<ommitted>",
  "ts": "1686086970.626639",
  "message": {
    "bot_id": "<ommitted>",
    "type": "message",
    "text": "foobar",
    "user": "<ommitted>",
    "ts": "1686086970.626639",
    "app_id": "<ommitted>",
    "blocks": [
      {
        "type": "rich_text",
        "block_id": "<ommitted>",
        "elements": [
          {
            "type": "rich_text_section",
            "elements": [
              {
                "type": "text",
                "text": "foobar"
              }
            ]
          }
        ]
      }
    ],
    "team": "<ommitted>",
    "bot_profile": {
      "id": "<ommitted>",
      "app_id": "<ommitted>",
      "name": "<ommitted>",
      "icons": {
        "image_36": "<ommitted>",
        "image_48": "<ommitted>",
        "image_72": "<ommitted>"
      },
      "deleted": false,
      "updated": 1686039611,
      "team_id": "<ommitted>"
    }
  },
  "warning": "missing_charset",
  "response_metadata": {
    "warnings": [
      "missing_charset"
    ]
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions