Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebHooks wont update the database with the user's change until you respond with 200 OK. #3575

Open
n8ores opened this issue Feb 15, 2021 · 4 comments

Comments

@n8ores
Copy link
Contributor

n8ores commented Feb 15, 2021

I have noticed today that when you enable Webhooks, if you receive the Webhook that the WeKan server wont insert the User's change into the database until you respond back from your WebHook callback.

I am assuming that this is by design, so that you can use webhooks to prevent inserts (by responding with a code that isn't 200 etc)?

@xet7
Copy link
Member

xet7 commented Feb 15, 2021

@n8ores

AFAIK:

  • Wekan Outgoing Webhooks send changes from Wekan to for example Chat, it does not save anything
  • Incoming data is only with REST API, also see API usage example

Please give more details about the data flow you mean, because I did not quite get it yet.

@n8ores
Copy link
Contributor Author

n8ores commented Feb 18, 2021

@xet7

  1. I have a HTTP server receiving the webbook events from WeKan, this is not a problem.
  2. When I change a custom field value, that sends a webhook event to my HTTP server which I receive using my server.
  3. If my server does not respond with 200 OK (or any response) but instead keeps the connection active, then WeKan will not save my change to the custom field.
  4. As soon as I give a response to the webhook then WeKan saves my change to the database.

It appears the Webhook code is blocking the change event from saving in WeKan to until after it receives a valid response from the server.

To test this. Simply create a HTTP server, and dont respond when you receive a webhook request. Make a change to a custom field and then refresh your page. The OLD value will still be populated in the field and not the new value.

As I said, this may be the desired behavior (blocking updates to the MongoDb until after a valid Webhook server response is received) as it allows developers to prevent changes from occurring if they want. But I just wanted to check as it is not documented that I can find, and probably should be.

@RyanHecht
Copy link

Is there a bounty set for this? I'd be happy to help fund it :)

@xet7
Copy link
Member

xet7 commented Dec 29, 2021

@RyanHecht

It is possible to fund this with 500 euro at https://wekan.team/commercial-support/

This has not been funded yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants