title: Slack View_submission not posting to Current Window
body: <p>I am using the below code, to define Modal <code>blocks</code> and then submit the Modal via flask to slack. The slack command works fine and brings up the Modal UI. When I submit the Modal, it takes me to <code>view_submission()</code> method. In this method, I am calling <code>client.chat_postMessage()</code> to post a response to the current window, but this does not happen. If I pass in a Slack <code>ChannelID</code>, it posts the message to the channel, but when I pass in a Slack <code>User_Id</code> of the User I am interacting with via a DM, the message gets posted to the bots home screen. How do I post a response to the same window that the slash command was executed/requested from? I am looking for functionality similar to the <code>/remind</code> app in slack.</p>
  <p><a href="https://i.stack.imgur.com/7FkYE.png" rel="nofollow noreferrer">Response from /reminder command within same window</a></p>
  <pre><code>import os, logging
  
  logging.basicConfig(level=logging.DEBUG)
  
  from slack_bolt import App
  
  app = App(
      token=&quot;&quot;,
      signing_secret=&quot;&quot;,
  )
  
  
  @app.middleware  # or app.use(log_request)
  def log_request(logger, body, next):
      logger.debug(body)
      next()
  
  
  # Step 5: Payload is sent to this endpoint, we extract the `trigger_id` and call views.open
  @app.command(&quot;/jarvis&quot;)
  def handle_command(body, ack, client, logger):
      logger.info(body)
      ack(text=&quot;Accepted!&quot;,
          blocks=[
              {
                  &quot;type&quot;: &quot;section&quot;,
                  &quot;block_id&quot;: &quot;b&quot;,
                  &quot;text&quot;: {
                      &quot;type&quot;: &quot;mrkdwn&quot;,
                      &quot;text&quot;: &quot;:white_check_mark: Accepting New Request!&quot;,
                  },
              }
          ],
      )
  
      modal_block = open(&quot;modal.json&quot;, &quot;r&quot;).read()
  
      res = client.views_open(
          trigger_id=body[&quot;trigger_id&quot;],
          view={
              &quot;type&quot;: &quot;modal&quot;,
              &quot;callback_id&quot;: &quot;settings-modal&quot;,
              &quot;title&quot;: {&quot;type&quot;: &quot;plain_text&quot;, &quot;text&quot;: &quot;Settings Form&quot;},
              &quot;submit&quot;: {&quot;type&quot;: &quot;plain_text&quot;, &quot;text&quot;: &quot;Submit&quot;},
              &quot;close&quot;: {&quot;type&quot;: &quot;plain_text&quot;, &quot;text&quot;: &quot;Cancel&quot;},
              &quot;blocks&quot;: modal_block,
              &quot;private_metadata&quot;: &quot;what is gona come here?&quot;
          },
      )
      logger.info(res)
  
  
  # Step 4: The path that allows for your server to receive information from the modal sent in Slack
  @app.view(&quot;settings-modal&quot;)
  def view_submission(ack, body, client, logger):
      ack()
      logger.info(body[&quot;view&quot;][&quot;state&quot;][&quot;values&quot;])
      user_Id = body[&quot;user&quot;][&quot;id&quot;]
      client.chat_postMessage(channel=user_Id, text=&quot;submitted, wait please!!!&quot;)
  
  
  if __name__ == &quot;__main__&quot;:
      app.start(5000)
  </code></pre>
  <p><code>modal.json</code></p>
  <pre><code>[
          {
              &quot;type&quot;: &quot;section&quot;,
              &quot;text&quot;: {
                  &quot;type&quot;: &quot;plain_text&quot;,
                  &quot;text&quot;: &quot;:wave: Hello!\n\nUse this tool wisely!!!&quot;
              }
          },
          {
              &quot;type&quot;: &quot;divider&quot;
          },
          {
              &quot;type&quot;: &quot;input&quot;,
              &quot;block_id&quot;: &quot;source_block&quot;,
              &quot;label&quot;: {
                  &quot;type&quot;: &quot;plain_text&quot;,
                  &quot;text&quot;: &quot;Source Tenant Name&quot;,
                  &quot;emoji&quot;: true
              },
              &quot;element&quot;: {
                  &quot;type&quot;: &quot;plain_text_input&quot;
              }
          },
          {
              &quot;type&quot;: &quot;divider&quot;
          },
          {
              &quot;type&quot;: &quot;input&quot;,
              &quot;block_id&quot;: &quot;dest_block&quot;,
              &quot;label&quot;: {
                  &quot;type&quot;: &quot;plain_text&quot;,
                  &quot;text&quot;: &quot;Destination Tenant Name&quot;,
                  &quot;emoji&quot;: true
              },
              &quot;element&quot;: {
                  &quot;type&quot;: &quot;plain_text_input&quot;
              }
          },
          {
              &quot;type&quot;: &quot;input&quot;,
              &quot;block_id&quot;: &quot;settings_block&quot;,
              &quot;label&quot;: {
                  &quot;type&quot;: &quot;plain_text&quot;,
                  &quot;text&quot;: &quot;Choose Settings&quot;
              },
              &quot;element&quot;: {
                  &quot;type&quot;: &quot;multi_static_select&quot;,
                  &quot;placeholder&quot;: {
                      &quot;type&quot;: &quot;plain_text&quot;,
                      &quot;text&quot;: &quot;Select 1 or more Settings from the list below&quot;
                  },
                  &quot;initial_options&quot;: [
                      {
                          &quot;value&quot;: &quot;value-0&quot;,
                          &quot;text&quot;: {
                              &quot;type&quot;: &quot;plain_text&quot;,
                              &quot;text&quot;: &quot;BU&quot;
                          }
                      },
                      {
                          &quot;value&quot;: &quot;value-1&quot;,
                          &quot;text&quot;: {
                              &quot;type&quot;: &quot;plain_text&quot;,
                              &quot;text&quot;: &quot;JT&quot;
                          }
                      }
                  ],
                  &quot;options&quot;: [
                      {
                          &quot;text&quot;: {
                              &quot;type&quot;: &quot;plain_text&quot;,
                              &quot;text&quot;: &quot;BU&quot;,
                              &quot;emoji&quot;: true
                          },
                          &quot;value&quot;: &quot;value-0&quot;
                      },
                      {
                          &quot;text&quot;: {
                              &quot;type&quot;: &quot;plain_text&quot;,
                              &quot;text&quot;: &quot;JT&quot;,
                              &quot;emoji&quot;: true
                          },
                          &quot;value&quot;: &quot;value-1&quot;
                      },
                      {
                          &quot;text&quot;: {
                              &quot;type&quot;: &quot;plain_text&quot;,
                              &quot;text&quot;: &quot;:desert_island: Hawaiian&quot;,
                              &quot;emoji&quot;: true
                          },
                          &quot;value&quot;: &quot;value-2&quot;
                      },
                      {
                          &quot;text&quot;: {
                              &quot;type&quot;: &quot;plain_text&quot;,
                              &quot;text&quot;: &quot;Camp&quot;,
                              &quot;emoji&quot;: true
                          },
                          &quot;value&quot;: &quot;value-3&quot;
                      },
                      {
                          &quot;text&quot;: {
                              &quot;type&quot;: &quot;plain_text&quot;,
                              &quot;text&quot;: &quot;TenMgmt&quot;,
                              &quot;emoji&quot;: true
                          },
                          &quot;value&quot;: &quot;value-4&quot;
                      },
                      {
                          &quot;text&quot;: {
                              &quot;type&quot;: &quot;plain_text&quot;,
                              &quot;text&quot;: &quot;:taco: Tacos&quot;,
                              &quot;emoji&quot;: true
                          },
                          &quot;value&quot;: &quot;value-5&quot;
                      },
                      {
                          &quot;text&quot;: {
                              &quot;type&quot;: &quot;plain_text&quot;,
                              &quot;text&quot;: &quot;:green_salad: Salad&quot;,
                              &quot;emoji&quot;: true
                          },
                          &quot;value&quot;: &quot;value-6&quot;
                      },
                      {
                          &quot;text&quot;: {
                              &quot;type&quot;: &quot;plain_text&quot;,
                              &quot;text&quot;: &quot;:stew: Indian&quot;,
                              &quot;emoji&quot;: true
                          },
                          &quot;value&quot;: &quot;value-7&quot;
                      }
                  ]
              }
          }
      ]
  </code></pre>