From a7301efb2630b26db2349206d0cc7a9ca54d4a12 Mon Sep 17 00:00:00 2001 From: Loan Robert Date: Tue, 23 Jul 2024 12:19:58 +0200 Subject: [PATCH] Disable default meeting file and send all files asynchronously to avoid long meeting creation delays --- web/b3desk/models/bbb.py | 18 ++++++++++-------- web/b3desk/templates/meeting/files.html | 6 +++--- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/web/b3desk/models/bbb.py b/web/b3desk/models/bbb.py index d8be873c..eb74f8d3 100644 --- a/web/b3desk/models/bbb.py +++ b/web/b3desk/models/bbb.py @@ -189,21 +189,23 @@ def create(self): # default file is sent right away since it is need as the background # image for the meeting - xml = ( - self.meeting_file_addition_xml([self.meeting.default_file]) - if self.meeting.default_file - else None - ) - request = self.bbb_request("create", "POST", params=params, data=xml) + # xml = ( + # self.meeting_file_addition_xml([self.meeting.default_file]) + # if self.meeting.default_file + # else None + # ) + # TODO: xml as data is not sent anymore at BBB meeting creation to avoid delay + request = self.bbb_request("create", "POST", params=params) data = self.bbb_response(request) # non default files are sent later if ( - self.meeting.non_default_files + self.meeting.files and "returncode" in data and data["returncode"] == "SUCCESS" ): - xml = self.meeting_file_addition_xml(self.meeting.non_default_files) + xml = self.meeting_file_addition_xml(self.meeting.files) + # TODO: send all files and not only the non default ones request = self.bbb_request( "insertDocument", params={"meetingID": self.meeting.meetingID} ) diff --git a/web/b3desk/templates/meeting/files.html b/web/b3desk/templates/meeting/files.html index 4c2999ae..48a40703 100644 --- a/web/b3desk/templates/meeting/files.html +++ b/web/b3desk/templates/meeting/files.html @@ -129,7 +129,7 @@

Vous pouvez ajouter un fichier :

Vos fichiers associés sont : - Défaut + Téléchargeable Titre Ajouté le @@ -176,7 +176,7 @@

- +
{% if file.is_downloadable %}