HubSpot / slack-client

An asynchronous HTTP client for Slack's web API
Apache License 2.0
115 stars 53 forks source link

Add subtype for conversations-select input #253

Closed zmarushchak-hs closed 3 years ago

zmarushchak-hs commented 3 years ago

Added fields for ConversationsSelectMenu model to receive channel id in the View Submission. Also added subtype of ViewInput type for the conversations-select input object unmarshalling.

Context: when the user selects the channel from Conversations list on the model, Slack sends are conversations-select object in the view submission state field (please see example below). In order to get the select channel, we need to have a corresponding model.

{
  "type": "view_submission",
    .
    .
    .
    "callback_id": "callbackId",
    "state": {
      "values": {
       .
       .
       .
        "cdA=j": {
          "conversation-select": {
            "type": "conversations_select",
            "selected_conversation": "CHANNELID"
          }
        }
      }
    },
    "hash": "hash",
    "title": {