Commit 5a68ab6d authored by Martin Mareš's avatar Martin Mareš
Browse files

Hook: Skip deleted occurrences

parent af744b2b
......@@ -57,6 +57,9 @@ def insert_meeting(uid, meet):
# Recurrent meetings have a list of occurrences
for occ in meet["occurrences"]:
occ_id = occ['occurrence_id']
if occ.get('status', "") == 'deleted':
print(f"Meeting {meeting_id}.{occ_id}: Marked as deleted")
continue
print(f"Meeting {meeting_id}.{occ_id}: Scheduling")
db.execute("""
INSERT INTO zoom_schedule
......
......@@ -64,6 +64,9 @@ class HookApp:
def create_schedule(self, mid, meeting_id, occurrence_id, occ):
if occ.get('status', "") == 'deleted':
self.log(f"Meeting {meeting_id}.{occurrence_id}: Skipping deleted occurrence")
return
self.log(f"Meeting {meeting_id}.{occurrence_id}: Scheduling")
db_query("""
INSERT INTO zoom_schedule
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment