Add zoom meeting whitelist #56

Merged
bumi merged 6 commits from feature/zoom-meeting-whitelist into master 2020-05-18 08:43:26 +00:00
bumi commented 2020-04-30 14:22:23 +00:00 (Migrated from github.com)

This allows to only record meetings for certain whitelisted meeting ids.

[closes: #55 ]

This allows to only record meetings for certain whitelisted meeting ids. [closes: #55 ]
raucao (Migrated from github.com) reviewed 2020-04-30 17:52:23 +00:00
raucao (Migrated from github.com) commented 2020-04-30 17:52:23 +00:00

While we're adding untested code, how about this? 😃

        process.env.KREDITS_ZOOM_MEETING_WHITELIST?.split(',').includes(object.id)
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
raucao (Migrated from github.com) commented 2020-05-07 12:25:46 +00:00

@bumi Did you see this?

@bumi Did you see this?
bumi (Migrated from github.com) reviewed 2020-05-14 07:50:32 +00:00
bumi (Migrated from github.com) commented 2020-05-14 07:50:32 +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?

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
galfert (Migrated from github.com) commented 2020-05-14 09:46:40 +00:00

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.

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
raucao (Migrated from github.com) commented 2020-05-14 09:58:18 +00:00
The Zoom integration creates contributions for meeting participations.
```suggestion The Zoom integration creates contributions for meeting participations. ```
raucao (Migrated from github.com) reviewed 2020-05-14 09:59:11 +00:00
raucao (Migrated from github.com) commented 2020-05-14 09:59:10 +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
raucao (Migrated from github.com) commented 2020-05-14 10:00:51 +00:00

True. I missed the functional change.

True. I missed the functional change.
bumi (Migrated from github.com) reviewed 2020-05-14 10:12:54 +00:00
bumi (Migrated from github.com) commented 2020-05-14 10:12:54 +00:00

ah, thanks. good to know.

ah, thanks. good to know.
bumi commented 2020-05-18 07:33:28 +00:00 (Migrated from github.com)

mergeable?

mergeable?
raucao commented 2020-05-18 08:06:51 +00:00 (Migrated from github.com)

Did you at least run it once locally?

Did you at least run it once locally?
bumi commented 2020-05-18 08:32:06 +00:00 (Migrated from github.com)

yes, looked fine for me with manually calling the endpoint.
(and then removed the WIP/untested comment here)

yes, looked fine for me with manually calling the endpoint. (and then removed the WIP/untested comment here)
raucao commented 2020-05-18 08:42:43 +00:00 (Migrated from github.com)

Great. Let's try it in prod then.

Great. Let's try it in prod then.
raucao (Migrated from github.com) approved these changes 2020-05-18 08:42:53 +00:00
Sign in to join this conversation.
No description provided.