diff --git a/apps/course/views/webhook.py b/apps/course/views/webhook.py index 51b85aa..eb12fe3 100644 --- a/apps/course/views/webhook.py +++ b/apps/course/views/webhook.py @@ -93,7 +93,7 @@ class PlugNMeetWebhookAPIView(APIView): 'room_finished': self._handle_room_finished, 'participant_joined': self._handle_participant_joined, 'participant_left': self._handle_participant_left, - 'RECORDING_PROCEEDED': self._handle_recording_proceeded, + 'recording_proceeded': self._handle_recording_proceeded, } handler = handler_map.get(event) diff --git a/scripts/test_webhook.py b/scripts/test_webhook.py index 120f8c9..4edc19c 100755 --- a/scripts/test_webhook.py +++ b/scripts/test_webhook.py @@ -131,6 +131,23 @@ def get_test_payload(event_type: str) -> dict: "duration": 3600, "status": "FINISHED" } + }, + 'RECORDING_PROCEEDED': { + "event": "recording_proceeded", + "id": "880e8400-e29b-41d4-a716-446655440004", + "createdAt": timestamp, + "room": { + "sid": "room-123456", + "identity": "test-room-20240101120000", + "name": "Test Class" + }, + "recording_info": { + "recordId": "rec-123456", + "recorderId": "node_01", + "recorderMsg": "success", + "filePath": "node_01/test-room-20240101120000/rec-123456.mp4", + "fileSize": 0.38 + } } } @@ -218,6 +235,7 @@ def main(): print(" - participant_joined") print(" - participant_left") print(" - end_recording") + print(" - RECORDING_PROCEEDED") print("\nOptions:") print(" --dry-run Show payload without sending request") sys.exit(1)