Skip to content

Commit de39fb8

Browse files
committed
Add zoom link
1 parent 1ae7003 commit de39fb8

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

schedulezoomtalks.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
- The VSF team
3636
""")
3737

38-
def schedule_zoom_talk(talk) -> string:
38+
def schedule_zoom_talk(talk) -> Tuple[string, string]:
3939

4040
# Form the talk registration body
4141
request_body =
@@ -101,7 +101,7 @@ def schedule_zoom_talk(talk) -> string:
101101
# Update the registrants email notification
102102
patch_registration_notification(meeting_id)
103103

104-
return meeting_id
104+
return meeting_id, response.join_url
105105

106106
def register_speaker(meeting_id, talk) -> int:
107107

@@ -191,15 +191,15 @@ def notify_issue_about_zoom_meeting(repo, talk):
191191
print("Couldn't create issue comment. The content would have been: ")
192192
print(issue_comment)
193193

194-
def notify_author(talk) -> string:
194+
def notify_author(talk, join_url) -> string:
195195
# Get the host key
196196
meeting_host_key = host_key(talk["time"])
197197

198198
# Format the email body
199199
meeting_start = datetime.datetime(talk["time"], tz=pytz.UTC)
200200
meeting_end = meeting_start + datetime.timedelta(hours=1)
201201
email_text = EMAIL_TEMPLATE.render(author=talk["speaker_name"],
202-
meeting_zoom_link="",
202+
meeting_zoom_link=join_url,
203203
meeting_host_key=meeting_host_key,
204204
meeting_talk_title=talk["title"],
205205
meeting_date=meeting_start.date,
@@ -228,14 +228,15 @@ def schedule_talks(repo, talks) -> int:
228228
if "zoom_meeting_id" in talk or talk["event_type"] != "speakers_corner":
229229
continue
230230

231-
if( meetind_id := schedule_zoom_talk(talk) ):
231+
meeting_id, join_url = schedule_zoom_talk(talk)
232+
if( meetind_id ):
232233
talk.get("zoom_meeting_id") = meeting_id
233234
# Add this talk to researchseminars.org
234235
publish_to_researchseminars(talk)
235236
# Create comment in issue
236237
notify_issue_about_zoom_meeting(repo, talk)
237238
# Email the author
238-
notify_author(talk)
239+
notify_author(talk, join_url)
239240

240241
num_updated += 1
241242

0 commit comments

Comments
 (0)