|
|
@ -46,6 +46,13 @@ def get_live_session_subject(course): |
|
|
return f"{title} Live Session" |
|
|
return f"{title} Live Session" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_plugnmeet_webhook_url() -> str: |
|
|
|
|
|
base = getattr(settings, 'SITE_DOMAIN', '').rstrip('/') |
|
|
|
|
|
if not base: |
|
|
|
|
|
raise ImproperlyConfigured('SITE_DOMAIN must be configured for PlugNMeet webhook delivery.') |
|
|
|
|
|
return f"{base}/api/courses/plugnmeet/webhook/" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CourseLiveSessionRoomCreateAPIView(GenericAPIView): |
|
|
class CourseLiveSessionRoomCreateAPIView(GenericAPIView): |
|
|
permission_classes = [IsAuthenticated] |
|
|
permission_classes = [IsAuthenticated] |
|
|
authentication_classes = [TokenAuthentication] |
|
|
authentication_classes = [TokenAuthentication] |
|
|
@ -244,6 +251,7 @@ class CourseLiveSessionRoomCreateAPIView(GenericAPIView): |
|
|
# Build secured, centralized metadata. Client overrides are NOT allowed. |
|
|
# Build secured, centralized metadata. Client overrides are NOT allowed. |
|
|
return { |
|
|
return { |
|
|
'room_title': subject, |
|
|
'room_title': subject, |
|
|
|
|
|
'webhook_url': get_plugnmeet_webhook_url(), |
|
|
'default_lock_settings': { |
|
|
'default_lock_settings': { |
|
|
'lock_microphone': True, |
|
|
'lock_microphone': True, |
|
|
'lock_webcam': True, |
|
|
'lock_webcam': True, |
|
|
|