|
35 | 35 | - The VSF team |
36 | 36 | """) |
37 | 37 |
|
38 | | -def schedule_zoom_talk(talk) -> string: |
| 38 | +def schedule_zoom_talk(talk) -> Tuple[string, string]: |
39 | 39 |
|
40 | 40 | # Form the talk registration body |
41 | 41 | request_body = |
@@ -101,7 +101,7 @@ def schedule_zoom_talk(talk) -> string: |
101 | 101 | # Update the registrants email notification |
102 | 102 | patch_registration_notification(meeting_id) |
103 | 103 |
|
104 | | - return meeting_id |
| 104 | + return meeting_id, response.join_url |
105 | 105 |
|
106 | 106 | def register_speaker(meeting_id, talk) -> int: |
107 | 107 |
|
@@ -191,15 +191,15 @@ def notify_issue_about_zoom_meeting(repo, talk): |
191 | 191 | print("Couldn't create issue comment. The content would have been: ") |
192 | 192 | print(issue_comment) |
193 | 193 |
|
194 | | -def notify_author(talk) -> string: |
| 194 | +def notify_author(talk, join_url) -> string: |
195 | 195 | # Get the host key |
196 | 196 | meeting_host_key = host_key(talk["time"]) |
197 | 197 |
|
198 | 198 | # Format the email body |
199 | 199 | meeting_start = datetime.datetime(talk["time"], tz=pytz.UTC) |
200 | 200 | meeting_end = meeting_start + datetime.timedelta(hours=1) |
201 | 201 | email_text = EMAIL_TEMPLATE.render(author=talk["speaker_name"], |
202 | | - meeting_zoom_link="", |
| 202 | + meeting_zoom_link=join_url, |
203 | 203 | meeting_host_key=meeting_host_key, |
204 | 204 | meeting_talk_title=talk["title"], |
205 | 205 | meeting_date=meeting_start.date, |
@@ -228,14 +228,15 @@ def schedule_talks(repo, talks) -> int: |
228 | 228 | if "zoom_meeting_id" in talk or talk["event_type"] != "speakers_corner": |
229 | 229 | continue |
230 | 230 |
|
231 | | - if( meetind_id := schedule_zoom_talk(talk) ): |
| 231 | + meeting_id, join_url = schedule_zoom_talk(talk) |
| 232 | + if( meetind_id ): |
232 | 233 | talk.get("zoom_meeting_id") = meeting_id |
233 | 234 | # Add this talk to researchseminars.org |
234 | 235 | publish_to_researchseminars(talk) |
235 | 236 | # Create comment in issue |
236 | 237 | notify_issue_about_zoom_meeting(repo, talk) |
237 | 238 | # Email the author |
238 | | - notify_author(talk) |
| 239 | + notify_author(talk, join_url) |
239 | 240 |
|
240 | 241 | num_updated += 1 |
241 | 242 |
|
|
0 commit comments