Closed RedHoes closed 11 months ago
I hope the information I provided is enough for you to give me suggestion. Thanks so much !
Hi @RedHoes, thanks for asking the question.
Btw, I just can handle the first clause, I can't find out the way to close the modal without clicking on Cancel Button
Unfortunately, there is no way to do this. Only your end-users can close the modal by clicking either x
on the top or Cancel
button.
I want to close the modal before send slash message to slack
To send your message asynchronously, you can use app.executorService().submit()
to run the logic. To ensure the message is sent out a while after closing the modal dialog, you may want to have Thread.sleep(ms)
in the code executed by the ExecutorService. Refer to https://slack.dev/java-slack-sdk/guides/bolt-basics for the code snippets.
I hope this helps.
Thanks for your answer, but anytime I click on the Submit button, this message appears, how to avoid it:
We had some trouble connecting. Try again?
Could you double-check if your app code has an app.viewSubmission listener for the callback_id plus you’ve set a valid Request URL in the Interactivity & Shortcuts section on your api.slack.com/apps site?
I haven't set up the app.viewSubmission listener yet, but I wonder if I can setup the listener through my slack bot, because all the actions I manage in Slack is from this slackbot. Below is how I setup the slack bot
private val botClient: MethodsClient = Slack.getInstance().methods(config.slack.botToken)
The Slack instance provides only we api wrapper methods (e.g., chat.postMessage, views.open), so it does not support handlers for incoming requests from Slack. To handle those, you need to use App instance with valid configuration on api.slack.com site instead.
Thanks so much, I could resolve the issues
(Describe your issue and goal here)
Reproducible in:
The Slack SDK version
Module Version: slack.api.model: 1.29.2
Java Runtime version
openjdk version "11.0.20.1" 2023-08-24 OpenJDK Runtime Environment (build 11.0.20.1+1-post-Ubuntu-0ubuntu122.04) OpenJDK 64-Bit Server VM (build 11.0.20.1+1-post-Ubuntu-0ubuntu122.04, mixed mode, sharing)
OS info
34~22.04.1-Ubuntu
Steps to reproduce:
(Share the commands to run, source code, and project settings (e.g., pom.xml/build.gradle))
Actually, I don't handle any ViewSubmission in my code, how could I do now.
FYI, this is my code to handle ViewUpdateRequest:
Expected result:
I want to close the modal before send slash message to slack
Actual result:
(Tell what actually happened with logs, screenshots)
Requirements
Please make sure if this topic is specific to this SDK. For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. :bow:
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.