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

Webhook initial "ping" request sends a webhook ID of 0 #150

Open
thomasplevy opened this issue Mar 17, 2020 · 2 comments
Open

Webhook initial "ping" request sends a webhook ID of 0 #150

thomasplevy opened this issue Mar 17, 2020 · 2 comments
Labels
good first issue If you're a first time contributor this is a good issue for you! hacktoberfest PRs for this issue count towards Hacktoberfest contributions! help wanted Looking for contributors to assist with this issue Type: Bug Bugs and errors
Milestone

Comments

@thomasplevy
Copy link
Contributor

Reproduction Steps

  1. Create a new webhook for any topic
  2. Inspect the received "ping" event body

Expected

The body should be something like:

{
  "webhook_id": 1234,
}

where "1234" equals is the resource ID of the newly created webhook

Actual

The received event body will always have an ID of "0":

{
  "webhook_id": "0",
}

Information

I believe this is happening because the hookshot is fired before the webhook database object is created so there is no ID to send.

@thomasplevy thomasplevy added language: php Type: Bug Bugs and errors good first issue If you're a first time contributor this is a good issue for you! hacktoberfest PRs for this issue count towards Hacktoberfest contributions! help wanted Looking for contributors to assist with this issue labels Mar 17, 2020
@thomasplevy thomasplevy added this to the Future milestone Mar 17, 2020
@eri-trabiccolo
Copy link
Contributor

mmm but this means that we have to save the webhook before pinging...
while at the moment the save is subordinated to the pinging success.

@thomasplevy
Copy link
Contributor Author

Yes, it does... I'm not sure the best way to resolve but this is something of a minor issue.

We might have to save without pinging and change the state immediately if the ping fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue If you're a first time contributor this is a good issue for you! hacktoberfest PRs for this issue count towards Hacktoberfest contributions! help wanted Looking for contributors to assist with this issue Type: Bug Bugs and errors
Projects
Status: Backlog
Development

No branches or pull requests

2 participants