Skip to content
Snippets Groups Projects
Commit 8961b83f authored by Martin Mareš's avatar Martin Mareš
Browse files

Hook: Logging of all events as raw JSON

parent 7da8b663
No related branches found
No related tags found
No related merge requests found
......@@ -22,3 +22,10 @@ CREATE TABLE zoom_schedule (
duration int NOT NULL, -- minutes
UNIQUE(mid, occurrence_id)
);
CREATE TABLE zoom_events (
id serial PRIMARY KEY,
time timestamp NOT NULL DEFAULT NOW(),
event varchar(255) NOT NULL,
js jsonb NOT NULL
);
......@@ -255,6 +255,8 @@ class HookApp:
self.log(js)
event = js["event"]
db_query("INSERT INTO zoom_events(event,js) VALUES(%s,%s)", (event, json.dumps(js["payload"])))
if event == "meeting.created":
self.create_meeting(js)
elif event == "meeting.deleted":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment