I saw there were already similar questions, but the solutions suggested don't seem to work for some reason.
This is my code so far, the slash command works fine, opening the popup, but then inputting the text and clicking Request, the popup doesn't close
from flask import Flask, request, make_response
from slackclient import SlackClient
app = Flask(__name__)
channel = 'GMK3QAU' #test-private
client = SlackClient("xoxb-129609-51804835-PEdmr0WAq")
def dostuff(trigger_id, dialog):
response = client.api_call(
"dialog.open",
channel=channel,
headers={'content-type': 'x-www-form-urlencoded'},
trigger_id=trigger_id,
dialog=dialog)
return response
@app.route('/refresh-projects', methods=['POST'])
def hello_there():
trigger_id = request.form['trigger_id']
dialog = {
"callback_id": 'refresh_project',
"title": "Type the string",
"submit_label": "Request",
"state": "Limo",
"elements": [{
"type": "textarea",
"label": "Additional information",
"name": "infobox"}]}
response = dostuff(trigger_id, dialog)
return make_response("", 200)
if __name__ == '__main__':
app.run()
question from:
https://stackoverflow.com/questions/65829907/slack-dialog-open-box-not-closing 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…