松弛对话框打开框未关闭

问题描述

我看到已经有类似的问题,但建议的解决方案由于某种原因似乎不起作用。

到目前为止,这是我的代码,斜杠命令工作正常,打开弹出窗口,但输入文本并单击请求,弹出窗口没有关闭

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()

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)