Closed everthemore closed 4 years ago
Let's separate issues, and implement host key rotation separately (I'm looking into that). We'll arrange the sending at a later stage.
Also if the meeting is configured to send an email upon registration, then participants registered via API will receive a registration confirmation, resulting in the speaker getting 2 emails: one with the host key, and another one with their join URL.
As a workaround we can create the meeting with registrants_email_notification = False
, and then set it to True after registering the speaker.
Alternatively we can register the speaker with a wrong email. That's faster, but less classy.
@everthemore I pushed the implementation of host key rotation to the repo. host_key_rotation.host_key(timeslot: datetime.datetime)
generates the key for a specific time slot.
cron runs aren't on yet, but I checked that key updates work.
@everthemore the keys are fully in place, and should be easy to reuse. Let's get this one going now.
I also put some reusable zoom functionality into common.py
@akhmerov I added the 'add talk to researchseminars.org' file here too, since it makes sense to do so as soon as the zoom link has been registered.
The code is WIP, meaning that most likely some of the YAML fields are incorrectly named atm. I will fix this before we start testing of course. There are a few places in the code that I would like input on, I'll highlight them in review.
Closes #20
Result of the LRC questions query:
{'questions': [{'field_name': 'last_name', 'required': True},
{'field_name': 'org', 'required': False}],
'custom_questions': [{'title': 'Please confirm you have read the participant instructions: http://virtualscienceforum.org/#/attendeeguide',
'type': 'short',
'required': True,
'answers': []},
{'title': 'May we contact you about future Virtual Science Forum events?',
'type': 'single',
'required': False,
'answers': ['Yes', 'No']},
{'title': 'How did you hear about the Virtual Science Forum?',
'type': 'single',
'required': False,
'answers': ['Email list',
'One of the organizers',
'A colleague (not an organizer)',
'Other']}]}
@akhmerov Regarding adding talks to researchseminars.org: Adding a talk should only happen once, in principle, once the zoom meeting id exists. If anything changes, the same piece of code will simply update it, if in addition we add the unique talk identifier in the body. So question: Do we want to add such an identifier in the yaml?
I have a temporary bit in there that prevents updating of the yaml file with talks, for the first few tests
Plan:
- [x] Implement email responses
What did you have in mind here? Should this instead be done by the host-key rotator?
Should this instead be done by the host-key rotator?
No, that one runs on schedule and doesn't know whom to contact. We should of course reuse the function that generates the host key for a given time slot, but call if from this workflow.
Use mailgun?
@akhmerov Zoom link for meeting is missing, and I'm sure other things are not up to standards. Hopefully I can tweak from here.
Like adding the time slot to the email
@akhmerov Merge for testing?
My linter catches a bunch of things, let me fix those first.
I propose to disable research seminars registration at first: it's easier to debug one thing at a time. Plus authorization is missing in one of the function signatures. Other than that I think good to merge and debug.
BTW, here the code for talking with zoom can be copies almost completely from #5