-
Notifications
You must be signed in to change notification settings - Fork 71
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
Fix meeting ended webhook #111
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm quite surprised that Zoom breaks there API like this. Is there any legacy mode? Or a mailing list to get this changes early?
server/http.go
Outdated
b, appErr := p.API.KVGet(key) | ||
if appErr != nil { | ||
if appErr != nil && !strings.Contains(appErr.Error(), "not found") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the key is not found, does the server send down an error? Is this by design?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look into this. It is a pattern we have in mscalendar, but it may be custom functionality bubbled up from the store layer there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From looking at the test cases in mattermost-server
, KVGet
returns (nil, nil)
is no value is found.
I am very shocked too. I don't see anything in their documentation about the change nor do I see anything in the docs about the old implementation. It's very strange. Here's a changelog where I would expect to see this info outlined https://support.zoom.us/hc/en-us/articles/204758419-New-updates-for-Web I did not previously have a webhook setup for testing, so I had to set one up for this task. I'm wondering if someone from the team that does can verify that pre-existing webhook setups have had their payload structure changed. I posted in the Zoom channel to ask for help on this.
I'm not seeing anything about the change, so I don't think they have any docs on the legacy setup. However, it could be on their site somewhere I haven't found. There is a |
Does the WaybackMachine report any changes on the documentation page in the last few month? |
@hanzei There doesn't seem to be any relevant info on docs changes from my search on the WaybackMachine. I see that one of the archive snapshots was triggered by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@mickmister I set this up locally and I'm not seeing this work. My zoom post does not get updated via the subscription when the meeting ends.
Any thoughts? |
Looking at the code, @mickmister is not using the verification token. Actually, as far as I have checked, the authorization token is only provided for published apps in the marketplace, so I would say the best would be to just use the Webhook secret, since it does a similar function. Regarding why this may not be working, I have no idea. Everything looks fine in the code. I will let @mickmister answer that part. |
Quote from one of my comments above:
@DHaussermann Did you already have the webhooks set up in Zoom? To view the body of a request in the ngrok interface, select the request on hte left side, then use the right side of the page to view the body. You can use the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and passed
- Zoom posts get update to remove join button and set meeting summary
- This is working following GitBook directions for the leave meeting event
- No further issues found
Huge thanks @mickmister for resolving this! There are a couple follow-up concerns to test in Master
- I'd like to see this work with an oAuth app as well
- In master, the posts are now made on behalf of the user rather than the Zoom Bot so these posts updating should be re-tested.
Are you able to merge this now? I can create a follow-up issue if I find any problms with the points above.
Summary
Zoom seems to have completely changed their webhook payloads to be
application/json
instead ofapplication/x-www-form-urlencoded
. https://marketplace.zoom.us/docs/api-reference/webhook-reference#notification-structureThis PR fixes this on our end by supporting the new payload format.
Ticket Link
Fixes #72
https://mattermost.atlassian.net/browse/MM-20656