Skip to content

Commit

Permalink
fix record value and remove recording ready url if meeting disable re…
Browse files Browse the repository at this point in the history
…cord (#963)
  • Loading branch information
ptitloup authored Sep 27, 2023
1 parent 72518c0 commit a98aba9
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions pod/meeting/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
BBB_SECRET_KEY = getattr(settings, "BBB_SECRET_KEY", "")
BBB_LOGOUT_URL = getattr(settings, "BBB_LOGOUT_URL", "")
MEETING_PRE_UPLOAD_SLIDES = getattr(settings, "MEETING_PRE_UPLOAD_SLIDES", "")
MEETING_DISABLE_RECORD = getattr(settings, "MEETING_DISABLE_RECORD", True)
STATIC_ROOT = getattr(settings, "STATIC_ROOT", "")
TEST_SETTINGS = getattr(settings, "TEST_SETTINGS", False)

Expand Down Expand Up @@ -471,6 +472,8 @@ def save(self, *args, **kwargs):
newid = self.id
newid = "%04d" % newid
self.meeting_id = "%s-%s" % (newid, slugify(self.name))
if MEETING_DISABLE_RECORD:
self.record = False
super(Meeting, self).save(*args, **kwargs)

def get_hashkey(self):
Expand Down Expand Up @@ -598,10 +601,9 @@ def create(self, request=None):
}
)
# let duration and voiceBridge to default value
if BBB_LOGOUT_URL == "":
parameters["logoutURL"] = "".join(["https://", get_current_site(None).domain])
else:
parameters["logoutURL"] = BBB_LOGOUT_URL
parameters["logoutURL"] = BBB_LOGOUT_URL if (
BBB_LOGOUT_URL != ""
) else "".join(["https://", get_current_site(None).domain])
endCallbackUrl = "".join(
[
"https://",
Expand All @@ -610,14 +612,15 @@ def create(self, request=None):
]
)
parameters["meta_endCallbackUrl"] = endCallbackUrl
recordingReadyUrl = "".join(
[
"https://",
get_current_site(None).domain,
reverse("meeting:recording_ready", kwargs={}),
]
)
parameters["meta_bbb-recording-ready-url"] = recordingReadyUrl
if not MEETING_DISABLE_RECORD:
recordingReadyUrl = "".join(
[
"https://",
get_current_site(None).domain,
reverse("meeting:recording_ready", kwargs={}),
]
)
parameters["meta_bbb-recording-ready-url"] = recordingReadyUrl
query = urlencode(parameters)
hashed = api_call(query, action)
url = slash_join(BBB_API_URL, action, "?%s" % hashed)
Expand Down

0 comments on commit a98aba9

Please sign in to comment.