From 8732434119b2e9ba4534dd97bca263ddd8153122 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Thu, 14 Nov 2024 22:22:47 +0100 Subject: [PATCH] fix notif --- teleforma/views/core.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/teleforma/views/core.py b/teleforma/views/core.py index ef8d9429..d0e882bf 100644 --- a/teleforma/views/core.py +++ b/teleforma/views/core.py @@ -966,12 +966,14 @@ class LiveConferenceNotify(APIView): raise Exception('No conference id in request') conference = Conference.objects.get(pk=int(conference_id)) students = Student.objects.filter(period=conference.period, platform_only=True) - text = f"""Une conférence live "{conference.course.title}" commence""" - if conference.bbb_record_id: + + if conference.bbb_room_id: url = reverse('teleforma-conference-join', kwargs={'pk': conference.id}) + text = f"""Une visio-conférence live "{conference.course.title}" commence""" else: url = reverse('teleforma-conference-detail', kwargs={'period_id': conference.period.id, 'pk': conference.id}) + text = f"""Une conférence live classique "{conference.course.title}" commence""" # notify students for student in students: @@ -981,8 +983,6 @@ class LiveConferenceNotify(APIView): for course in courses: if conference.course == course['course'] and \ conference.course_type in course['types']: - if conference.bbb_room_id: - url = conference.get_join_conference_url(student.user) notify(student.user, text, url) logger.info("Student notified: " + student.user.username) except Exception as e: -- 2.39.5