Closed shai-katzir-hs closed 6 months ago
Strange, you should have these three message actions:
Perhaps your Slack integration is not configured properly? Make sure you have actually created the other two message actions, as described in the guide.
Hi @albogdano how are you? We are trying to use the "edit and ask" command in threads, but when we click it nothing happens, maybe you can help us with this issue? Let me know if you need more information. Thanks :)
You must configure the shortcut with the correct URL and with the exact callback ID as shown here:
@albogdano It seems like we configured it well
Ok, looks good. Make sure the callback URL is directly accessible from the internet and not behind a firewall or reverse proxy. If it is, make sure all headers and request parameters to the Scoold server are unmodified by the reverse proxy.
Slack signs each request to Scoold with a hash which Scoold verifies. If something is modified the request fails if the signature is invalid.
We don't use any reverse proxy, or firewall, we simply have a load balancer that opened for slack
Any errors in the Scoold logs? I suspect the load balancer is modifying the requests from Slack to Scoold and they fail the verification.
There are no errors at all, we do see some logs about operations in Scoold for example: 2023-12-19 09:43:07 [INFO ] New question 'A question from Slack' from Slack myOrg/#tmp-test-scoold.
Try the command /invite @scoold
in your Slack channel. If there are no errors then maybe Slack doesn't have access to Scoold directly.
Also try monitoring the access log of your load balancer and make sure you see requests from Slack to the /slack endpoint and the responses are 200 OK.
@albogdano We checked and all works as expected
So, is the issue resolved now? You seem to have two conflicting message shortcuts for the same action (edit & ask) - one is global and the other appears for each message. That could be problematic.
@albogdano By saying "We checked and all works as expected" I mean that we checked the logs of the load balancer and all worked as expected.
This issue is still unresolved
So, can you see requests coming from Slack to the /slack
endpoint in Scoold wheb you click a shortcut button or use the slash command?
Yes we can :)
So, you click the "edit and ask" button on a thread and you see the request in your LB with a 200 OK status? That should return a payload to Slack and show you a dialog box. If not, your LB is likely blocking something.
you can do the slash command and use Edit & Ask, it pops without the content of the threaded message
Using the slash command will always open a new question dialog with no content in it. If you click the "Edit and Ask" button on a threaded message you should see the content of the first message in the thread, displayed as text (question body) and no title (you need to write one). The other messages in the thread are not displayed because they will be created as answers to the question on Scoold. You can later remove the answers or edit them on Scoold if you have the rights to edit content.
Thanks! But we still see empty form when we click the "Edit and Ask" button on a threaded message .
Perhaps it is something to do with the Slack API. Scoold would try to extract the text
property of the first message and send it to the text field of the dialog box. I will check if there are any new changes to the Slack API which could cause this behavior.
Thank you @albogdano
Hi @albogdano how are you? Happy New Year! Any updates?
Happy New Year! Unfortunately, I couldn't reproduce the issue at all. I've tried a few different approaches, including non-English text (like Hebrew) but I always get a dialog box with the message shown as body of the question which I can edit before posting.
I checked the Slack API for recent changes - no breaking changes. The text
property is always shown and always contains the message text. Nowhere does the Slack documentation mention that it can be empty.
So, my best guess is that your configuration or load balancer is causing the issue. It's hard for me to debug this further with the limited information that I have right now.
Perhaps you could try running a single Scoold instance (without LB or proxy), on a single machine with direct access to Slack, and if all works well, progress from there.
The fact that you get back a dialog box with fields and buttons is an indication that your Slack integration works properly but I have no explanation why the body of the message is not displayed.
Using the slash command will always open a new question dialog with no content in it. If you click the "Edit and Ask" button on a threaded message you should see the content of the first message in the thread, displayed as text (question body) and no title (you need to write one). The other messages in the thread are not displayed because they will be created as answers to the question on Scoold. You can later remove the answers or edit them on Scoold if you have the rights to edit content.
The current situation is that when clickong the "Edit and Ask" button on a threaded message it works as expected - the question is displayed as the "question body". But when submitting, the answers do not appear on the Scoold thread.
So the issue now is that the answers are not submitted as part of the Scoold question
Thanks for clarifying @shai-katzir-hs! I saw what was going on and was able to fix it. The fix will be available in the new release of Scoold Pro next week.
Hello, is there a new version available ...
Unfortunately, I had to be away from work for a few days and will probably publish the new version tomorrow. Thank you for your patience!
@adi-zeevi-hs @shai-katzir-hs Scoold Pro 1.57.3
has been released.
Hi @albogdano ,
might be that we don't understand something..
When I have a post " this is post" and a thread post under it "this is thread post" , and I do "Edit & ask in Scoold" i expect the question in scoold to be "this is post" and the answer to be "this is thread post" .
But I only get the question without answers.
I don't know if it is related, but we see errors constantly in the logs
Your understanding is correct and Scoold will do exactly that if you click "Edit & ask" on the actual parent post "this is post". There should be a question "this is post" + answer "this is thread post" created in Scoold.
The errors you see in the console are not related but I think your server isn't working correctly - perhaps there's not enough memory or CPU to perform requests but I'm not sure exactly. Try restarting the server.
@adi-zeevi-hs @shai-katzir-hs Were you able to get this working? As I said the errors in the logs are not related to the bug which was fixed in 1.57.3
.
If the problem with the "Edit & ask" button is resolved, can we close this issue?
reference : https://github.com/Erudika/scoold-pro/issues/55
I have installed the latest version
1.57.2
but I am still unable to create a Scoold question out of an existing thread.I tried multiple approaches :
/scoold ask
does not work in threads/scoold
and "ask" does not respond/scoold
andedit & ask on Scoold
opens an empty pageexpected
When I hit
soold ask
on existing thread, it will add the first message as a question and the rest of the thread as the first answer in Scooldhttps://github.com/Erudika/scoold-pro/assets/143421098/34120aab-5c2d-45ab-a568-c4a426d05550