While we're adding untested code, how about this? :smiley:
```suggestion
process.env.KREDITS_ZOOM_MEETING_WHITELIST?.split(',').includes(object.id)
```
raucao
(Migrated from github.com)
reviewed 2020-05-07 12:25:46 +00:00
actually that does not work for me:
```
process.env.KREDITS_ZOOM_MEETING_WHITELIST?.split(',').includes(object.id)
SyntaxError: Unexpected token '.'
```
(the `.` after the `?`)
how does that `?` work?
galfert
(Migrated from github.com)
reviewed 2020-05-14 09:46:40 +00:00
But in this case, it would change the existing logic. It would not call handleZoomMeetingEnded() if there was no KREDITS_ZOOM_MEETING_WHITELIST environment variable defined, while the existing code would still call the function.
It's called optional chaining: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining
In Nodejs it's only supported since version 14.
But in this case, it would change the existing logic. It would not call `handleZoomMeetingEnded()` if there was no `KREDITS_ZOOM_MEETING_WHITELIST` environment variable defined, while the existing code would still call the function.
raucao
(Migrated from github.com)
reviewed 2020-05-14 09:58:18 +00:00
A Zoom JWT app has to be set up and an [event webhook subscription](https://marketplace.zoom.us/docs/api-reference/webhook-reference/meeting-events/meeting-ending")
```suggestion
A Zoom JWT app has to be set up and an [event webhook subscription](https://marketplace.zoom.us/docs/api-reference/webhook-reference/meeting-events/meeting-ending")
```
raucao
(Migrated from github.com)
reviewed 2020-05-14 10:00:51 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This allows to only record meetings for certain whitelisted meeting ids.
[closes: #55 ]
While we're adding untested code, how about this? 😃
@bumi Did you see this?
actually that does not work for me:
(the
.after the?)how does that
?work?It's called optional chaining: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining
In Nodejs it's only supported since version 14.
But in this case, it would change the existing logic. It would not call
handleZoomMeetingEnded()if there was noKREDITS_ZOOM_MEETING_WHITELISTenvironment variable defined, while the existing code would still call the function.True. I missed the functional change.
ah, thanks. good to know.
mergeable?
Did you at least run it once locally?
yes, looked fine for me with manually calling the endpoint.
(and then removed the WIP/untested comment here)
Great. Let's try it in prod then.